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

 채택된 답변

TAB
TAB 2013년 2월 8일

0 개 추천

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
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.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Errorbars에 대해 자세히 알아보기

태그

질문:

2013년 2월 8일

Community Treasure Hunt

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

Start Hunting!

Translated by