readstr.m

来自「matlab处理图像的一些基本方法。其中有一部分mex程序需要安装编译」· M 代码 · 共 17 行

M
17
字号
function S=readstr(File)%READSTR Read a text file%	S=readstr(File)%% reads a file into MATLAB String-MATRIX (equal num of columns)%% by I. Bucher fid=fopen(File); S=[];	    while 1 	        line = fgetl(fid); 		if ~isstr(line), break, end 		S=str2mat(S,line); 	    end 	    fclose(fid);

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?