Clear Filters
Clear Filters

flipud script problem

1 view (last 30 days)
Siddharth Mallya
Siddharth Mallya on 18 Mar 2011
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 Comments
Matt Tearle
Matt Tearle on 18 Mar 2011
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 on 18 Mar 2011
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.

Sign in to comment.

Accepted Answer

Paulo Silva
Paulo Silva on 19 Mar 2011
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 Comment
Matt Tearle
Matt Tearle on 19 Mar 2011
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.

Sign in to comment.

More Answers (1)

Jan
Jan on 18 Mar 2011
Did you set a breakpoint? You can check this by:
dbstatus
  1 Comment
Siddharth Mallya
Siddharth Mallya on 19 Mar 2011
??? 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

Sign in to comment.

Categories

Find more on Get Started with MATLAB in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!