1、Matlab中上标用^(指數),下标用 _(下劃線)
調用方式為: ^{任意字元}, _{任意字元}, 注意{}的使用!
舉例figure,title('基于幂級數e^{-||x-y||} 的點雲品質的配置設定')
2.Matlab保留小數點後面幾位。
>>a=123.4567890;
>>a=roundn(a,-4)
a = 123.4568
其中roundn函數功能如下:
y = ROUNDN(x) rounds the input data x to the nearest hundredth. %不指定n,精确到百分位 y = ROUNDN(x,n) rounds the input data x at the specified power %精确到小數點後指定位數n
2、[email protected]用法
類似于c++中的宏:
#define area(x) ((x)*(x))
文法: 變量名[email protected](輸入參數清單)運算表達式
這樣産生的函數句柄變量不指向特定的函數, 而是一個函數表達式
例如: