1.cell轉char字符串
//data爲cell
tmp=data{i};
%將data第i個轉爲char字符串存於tmp
2.字符轉數字
%str爲該數字字符
num=str2num(str);
%num=str2double(str);%會faster
3.讀取位於excel的文本以及數據
[data,text]=xlsread(filename);
%data存放數據矩陣,text存放的格式爲cell
4.xlswrite寫入不同sheet不同列
xlswrite(filename,data,'sheet1','A');
5.設置圖像標籤
axis(x_low,x_high,y_low,y_high);%圖像顯示範圍
legend('line1name','line2name');%加示例
grid on;%加網格
6.取整
floor(num);%向下取整
ceil(num);%向上取整
around(num);%四捨五入
fix(num);%向0取整