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

 Risposta accettata

TAB
TAB il 8 Feb 2013
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 Commenti

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
thankyou i solve my problem.
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.

Accedi per commentare.

Più risposte (0)

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by