flipud script problem

조회 수: 2 (최근 30일)
Siddharth Mallya
Siddharth Mallya 2011년 3월 18일
http://www.mathworks.com/matlabcentral/answers/1875-segmenting-using-x-y-co-ordinate-axis
I used the flipud function given in this answer earlier and it worked perfectly. Now for some reason everytime I try to execute this program or the version I have created of it, the interpreter stops at the 'axis xy' line. What could be the problem ?
  댓글 수: 2
Matt Tearle
Matt Tearle 2011년 3월 18일
what do you mean "stops"? an error? a breakpoint? it just doesn't seem to do what you expect the remaining lines to do?
Jan
Jan 2011년 3월 18일
If you are using this method, because it works for you (earlier), then it would be a good idea to accept the given answer in this thread.

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

채택된 답변

Paulo Silva
Paulo Silva 2011년 3월 19일
axis is a matlab function and you gave your script the same name, when you do axis xy your are actually calling your own script instead of the matlab function, the error comes up because your script isn't a function thus not accepting arguments (xy).
  댓글 수: 1
Matt Tearle
Matt Tearle 2011년 3월 19일
Bingo. Solution: change the name of script to something other than axis.
Tip: before you save your script as foo.m, enter
which foo
in the Command Window to see if something called foo is already on the MATLAB path. If so, pick a different name.

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

추가 답변 (1개)

Jan
Jan 2011년 3월 18일
Did you set a breakpoint? You can check this by:
dbstatus
  댓글 수: 1
Siddharth Mallya
Siddharth Mallya 2011년 3월 19일
??? Attempt to execute SCRIPT axis as a function:
Z:\home\siddharth\Documents\College Stuff\BE Project\Attempt1\axis.m
Error in ==> axis at 6
axis xy
This is the error I get

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

카테고리

Help CenterFile Exchange에서 Matrix Indexing에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by