what does mean : C:\Documents and Settings\A​lbert\erro​rbar.m

when I write this command it appear like this below:
>> errorbar(x,y,e)
??? Attempt to execute SCRIPT errorbar as a function:
C:\Documents and Settings\Albert\errorbar.m

 采纳的回答

It means that you have written a script errorbar. Scripts never accepts or return argument.... And you are calling this script with 3 arguments.
See

6 个评论

i dont get yet what should i do.
Instead of writing your code as script create a function which accepts arguments.
In your file errorbar.m
function errorbar(In1, In2, In3)
% Your Code
end
my command is:
>> x=linspace(0.2,21);
>> y=erf(x);
>> e=rand(size(x))/10;
>> errorbar(x,y,e)
and immediately stated:
??? Attempt to execute SCRIPT errorbar as a function:
C:\Documents and Settings\Albert\errorbar.m
Did you edit your C:\Documents and Settings\Albert\errorbar.m to start (very first line) with "function" ?
yes i edited it. the file. and it is ok.thx.

请先登录,再进行评论。

更多回答(0 个)

类别

帮助中心File Exchange 中查找有关 Errorbars 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by