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 件のコメント

uncung fgv
uncung fgv 2013 年 2 月 8 日
i dont get yet what should i do.
TAB
TAB 2013 年 2 月 8 日
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
uncung fgv
uncung fgv 2013 年 2 月 8 日
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
uncung fgv
uncung fgv 2013 年 2 月 8 日
thankyou i solve my problem.
Walter Roberson
Walter Roberson 2013 年 2 月 8 日
Did you edit your C:\Documents and Settings\Albert\errorbar.m to start (very first line) with "function" ?
uncung fgv
uncung fgv 2013 年 2 月 11 日
yes i edited it. the file. and it is ok.thx.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeErrorbars についてさらに検索

タグ

質問済み:

2013 年 2 月 8 日

Community Treasure Hunt

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

Start Hunting!

Translated by