Call a function of a file .m in matlab -
i have file .m , want call function of file .m. example, have file mded.m:
function esc = edlece(hoja,posf,posc) fid = fopen(hoja,'r','n','utf-8'); i=1:posf tline = fgetl(fid); end col = '%s'; i=2:posc-1 col = strcat(col, ' %s'); end esc = textscan(tline,strcat(col,' %d')); esc = esc{1,posc}; end
and want call function edlece in file .m. how do it?
(i sorry english)
save function in file same name function , .m file extension. in case, edlece.m. put file in current working directory or in directory in search path.
from other .m file, call function it's name, this:
esc = edlece(hoja,posf,posc);
click here instructions on how view/modify search path.
Comments
Post a Comment