I have downloaded herrorbar to create horizontal error bars but get an error?

3 ビュー (過去 30 日間)
Jacob
Jacob 2017 年 3 月 16 日
コメント済み: John D'Errico 2017 年 3 月 16 日
I have downloaded herrorbar from FEX and put it into my MATLAB folder where I am working.
The error I get is:
"Error: File: herrorbar.m Line: 1 Column: 19 Unexpected MATLAB operator."
Do I need to do something to install it properly?
Thanks in advance.
  2 件のコメント
John D'Errico
John D'Errico 2017 年 3 月 16 日
Note that when you report an error and ask for help, show the ENTIRE error message. Not just part of it. That helps us to help you.
Adam
Adam 2017 年 3 月 16 日
Obvious question would seem to be what is on line 1 (and esp column 19) of that file? A glance at the file on file exchange suggests the 19th character should be in the middle of the function name so clearly not a problem.

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

回答 (1 件)

John D'Errico
John D'Errico 2017 年 3 月 16 日
編集済み: John D'Errico 2017 年 3 月 16 日
Unless you edited the code and inserted some garbage characters, then saved it...
What version of MATLAB do you have? What version did it say that it was written under?
Almost certainly, you have an old version of MATLAB. In order to use that code, you will need to use a more recent version.
The command ver will tell you what version you have.
help ver
  2 件のコメント
Jacob
Jacob 2017 年 3 月 16 日
I actually had inserted garbage code somehow, thanks.
John D'Errico
John D'Errico 2017 年 3 月 16 日
Ah. That happens. This is why it is generally advised not to edit code just to look at it. Too many windows open at once, certainly true on my machine. Too easy to insert random characters. And then too easy to accidentally save a file.
So always use the type command to look at a file.

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

カテゴリ

Help Center および File ExchangeCreating, Deleting, and Querying Graphics Objects についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by