calculus 微積分
differentiation 微分
integration 積分
derivative 導數
integral 積分
References
Glossary of calculus (Wikipedia)
微積分常用述語中英文對照
Matlab: Basic Differentiation and Integration with the syms symbolic variable
Matlab: Differentiation of sine and cosine functions
Information about Electrical, Electronic, Communication and Computer Engineering 電機、電子、通訊、電腦資訊工程的學習筆記
相關資訊~生醫工程:StudyBME
聽力科技相關資訊:電子耳資訊小站
iOS程式語言:Study Swift
樹莓派和Python:Study Raspberry Pi
2018/04/13
2018/04/12
Matlab: Basic Differentiation and Integration with the syms symbolic variable
To perform basic calculus calculations with Matlab, declare symbolic variables with syms command:
>> syms x;
>> y = 3*x^3+2*x^2-4*x+5;
Hence y = 3x3+2x2-4x+5.
For differentiation, the derivative of y is y' = diff(y):
>> y_prime = diff(y)
y_prime =
9*x^2 + 4*x - 4
Hence y' = dy/dx = 9x2+4x-4.
For integration, the integral of y is ∫ y dy = int(y):
>> y_integral = int(y)
y_integral =
(3*x^4)/4 + (2*x^3)/3 - 2*x^2 + 5*x
Consequently, ∫ y dy = (3x4)/4 + (2x3)/3 - 2x2 + 5x + c.
References
Glossary of calculus (Wikipedia)
微積分常用述語中英文對照 (交大微積分教學小組)
Basic Calculus Terms 基本微基分名詞 (Study EECC)
Matlab: Differentiation of sine and cosine functions
>> syms x;
>> y = 3*x^3+2*x^2-4*x+5;
Hence y = 3x3+2x2-4x+5.
For differentiation, the derivative of y is y' = diff(y):
>> y_prime = diff(y)
y_prime =
9*x^2 + 4*x - 4
Hence y' = dy/dx = 9x2+4x-4.
For integration, the integral of y is ∫ y dy = int(y):
>> y_integral = int(y)
y_integral =
(3*x^4)/4 + (2*x^3)/3 - 2*x^2 + 5*x
Consequently, ∫ y dy = (3x4)/4 + (2x3)/3 - 2x2 + 5x + c.
References
Glossary of calculus (Wikipedia)
微積分常用述語中英文對照 (交大微積分教學小組)
Basic Calculus Terms 基本微基分名詞 (Study EECC)
Matlab: Differentiation of sine and cosine functions
2018/04/10
Matlab: Simple structure with dot (.)
To create a basic form of structure in Matlab, simply use a dot (.) as below:
>> mystruct.name = "peter";
>> mystruct.age = 15;
>> mystruct.hobby = "swimming";
>> mystruct
mystruct =
struct with fields:
name: "peter"
age: 15
hobby: "swimming"
>> mystruct.name = "peter";
>> mystruct.age = 15;
>> mystruct.hobby = "swimming";
>> mystruct
mystruct =
struct with fields:
name: "peter"
age: 15
hobby: "swimming"
2018/03/29
Verilog Development Environment with Mac
To develop Verilog codes with a Mac, the following tools may be used:
Command line editor: Nano
Graphical UI Editor: TextWrangler (Available on App Store for Free)
Compiler: Icarus Verilog (Install with Homebrew with command: brew install icarus-verilog)
Waveform Viewer: GTKWave (Write $dumpfile command to output vcd file
References:
如何在Mac OS X上安裝Verilog環境 (Instructions to Icarus Verilog and GTKWave installation)
is there a good verilog editor for mac?
Verilog vs. VHDL (Study EECC)
Digital Logic Design - Truth Table and K-map (Study EECC)
Command line editor: Nano
Graphical UI Editor: TextWrangler (Available on App Store for Free)
Compiler: Icarus Verilog (Install with Homebrew with command: brew install icarus-verilog)
Waveform Viewer: GTKWave (Write $dumpfile command to output vcd file
References:
如何在Mac OS X上安裝Verilog環境 (Instructions to Icarus Verilog and GTKWave installation)
is there a good verilog editor for mac?
Verilog vs. VHDL (Study EECC)
Digital Logic Design - Truth Table and K-map (Study EECC)
2018/03/16
Digital Logic Design - Truth Table and K-map
To convert digital logic conditions in a truth table to a digital circuit, use the K-map.
truth table 真值表
Karnaugh map / K-map 卡諾圖
Boolean algebra / logic algebra 布林代數 / 邏輯代數
References
Karnaugh map (Wikipedia)
Truth table (Wikipedia)
Boolean algebra (Wikipedia)
HOW TO: Combinational logic: Truth Table → Karnaugh Map → Minimal Form → Gate Diagram (YouTube)
Verilog Development Environment with Mac (Study EECC)
truth table 真值表
Karnaugh map / K-map 卡諾圖
Boolean algebra / logic algebra 布林代數 / 邏輯代數
References
Karnaugh map (Wikipedia)
Truth table (Wikipedia)
Boolean algebra (Wikipedia)
HOW TO: Combinational logic: Truth Table → Karnaugh Map → Minimal Form → Gate Diagram (YouTube)
Verilog Development Environment with Mac (Study EECC)
2018/03/10
Matlab: Run Hello World files written in C/C++ with MEX command
To run C/C++ files from Matlab, use the MEX command.
Create the files in C or C++:
C (hello.c)
C++ (helloCPP.cpp)
The mexFunction in either of the C or C++ example above is similar to the main function in pure C or C++ programs. Type your main program here such as printf in C or cout in C++.
Execute the files with the MEX command in Matlab such as below:
C
mex hello.c
hello
C++
mex helloCPP.cpp
helloCPP
Results in the Matlab command window:
References
Matlab 教材:測試 MEX-file
C language with Mac: Hello World with Mac's Terminal
C++ with Mac: Hello World with Mac's Terminal
Create the files in C or C++:
C (hello.c)
#include"mex.h"
#include<stdio.h>
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]){
printf("Hello, World!\n");
}
#include"mex.h"
#include <iostream>
using namespace std;
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]){
cout << "Hello, World!\n";
}
The mexFunction in either of the C or C++ example above is similar to the main function in pure C or C++ programs. Type your main program here such as printf in C or cout in C++.
Execute the files with the MEX command in Matlab such as below:
C
mex hello.c
hello
C++
mex helloCPP.cpp
helloCPP
Results in the Matlab command window:
References
Matlab 教材:測試 MEX-file
C language with Mac: Hello World with Mac's Terminal
C++ with Mac: Hello World with Mac's Terminal
2018/02/23
Verilog vs. VHDL
Verilog -
1984年推出、1995年成為標準IEEE 1364-1995、較廣泛使用、接近程式語言
VHDL (VHSIC Hardware Description Language) -
1983開始、1987年成為標準IEEE 1076-1995、使用較Verilog少、學習時間較Verilog長、仍有其優點
參考資料
Verilog (Wikipedia)
VHDL (Wikipedia)
SystemVerilog (Wikipedia)
Verilog HDL和VHDL的比較
Verilog Development Environment with Mac (Study EECC)
1984年推出、1995年成為標準IEEE 1364-1995、較廣泛使用、接近程式語言
VHDL (VHSIC Hardware Description Language) -
1983開始、1987年成為標準IEEE 1076-1995、使用較Verilog少、學習時間較Verilog長、仍有其優點
參考資料
Verilog (Wikipedia)
VHDL (Wikipedia)
SystemVerilog (Wikipedia)
Verilog HDL和VHDL的比較
Verilog Development Environment with Mac (Study EECC)
訂閱:
文章 (Atom)


