資源簡介
open_file.m
代碼片段和文件信息
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%?name???????:open_file
%?function???:打開文件,獲取譜數據
%?parameter??:無
%?return?????:pu_data----譜數據,列向量
%?author?????:逐臨
%?time???????:2018/1/4
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function?pu_data=open_file()
%%?獲取文件路徑和文件名
[filenamepathnamefilterindex]=uigetfile(...
????{‘*.txt‘‘文本文件(*.txt)‘;‘*.mca‘‘二進制文件(*.mca)‘;‘*.pu‘‘譜文本(*.pu)‘;‘*.*‘‘All?File(*.*)‘}...
????‘File?Selector‘);
%%?判斷文件名和文件路徑是否為空
if?isequal(filename0)?||isequal(pathname0)
????pu_data=0;
????return;
end
%%?讀取譜數據
fpath=[pathname?file
評論
共有 條評論