Converting MATLAB files to Octave

不问归期 提交于 2019-12-05 18:11:34

Addressing your first error, it's easier to explain with an example:

dirName = '/some/path';                       %# base directory
filesPath = fullfile(dirName, 'MLP', '*.m');  %# full path string

d = dir(filesPath);                           %# expand/enumerate files
for i=1:numel(d)
    disp( d(i).name )
end

You also could have built the path using string concatenation yourself:

%# '/some/path/MLP/*.m'
filesPath = [dirName filesep 'MLP' filesep '*.m'];

The above should work for both MATLAB and Octave

Dario Seidl

I know you already solved your problem, but if you have problems again here are some links with basic information about the differences between Matlab and Octave:

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!