一、save與load函數(shù)保存和加載程序數(shù)據(jù)
基本格式為:
load('FILENAME', 'VARIABLES')
例如,save ('datas.mat','data','x','y','z'); 表示將內存變量data, x, y, z 保存到當前路徑下的datas.mat文件,其它程序若要載入這幾個變量的數(shù)據(jù),只需前面路徑下執(zhí)行l(wèi)oad datas;即可。
1. 導入格式一致的數(shù)據(jù)
例1 現(xiàn)有txt文件如下:
代碼: