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

조회 수: 2 (최근 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 CenterFile Exchange에서 Signal Analysis에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by