开发者

Calling another script file in MATLAB

I am having a problem with calling another script from within a script. I run a script "a.m" and it uses a function detailed in another script "b.m", and within开发者_开发技巧 "b.m" there is an if clause which is supposed to rerun "a.m" given a certain condition is fulfilled. However, when trying to write this if clause and calling "a.m", i get this error:

Undefined variable "a" or class "a.m".

% My "if" clause in b.m looks like this:
if numel(xyz) == 0
    a.m;
end

Why am I getting this error, considering it's "a.m" that I initially run?


The syntax is wrong. You call it as a not a.m.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜