Surf error-- too many input arguments

Hello,
I am working with the surf function to plot three variables as a surface. Previously, my code worked fine and returned no errors. However, now every time I call it I get :
??? Error using ==> grid Too many input arguments.
Error in ==> surf at 106 grid(cax,'on');
I went back to the documentation and tried some of the examples there and I still get this error. https://dl.dropbox.com/u/47155364/Screen%20shot%202012-06-29%20at%2010.01.25.png
When I get the error, matlab is able to produce the surface but without the axes or axes labels (see above link). I am thinking there is something wrong either with the axes defaults and how surf is passing them, but I have no idea how to go about addressing this issue. Any thoughts? I am running Matlab 7.10 (R2010a) but I have tried it on another machine with R2011a and I get the same problem.

댓글 수: 3

grid on
or
caxis auto
grid(cax,'on'); % too much input parameter!
Ryan
Ryan 2012년 6월 29일
I just ran the exact code you did in your screenshot and had no issues executing it on 7.9 R2009b.
Did you accidentally redefine the variable 'grid' at any point in time in your code? Did you try clearing your variable space before running the examples?
Renee S.
Renee S. 2012년 6월 29일
I did try clearing the variable space before I ran the example, it didn't help. However, I added the line "grid on" to my code (as the first commenter suggested) after I called the figure and that seems to have solved the problem. Thanks for your quick responses!

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

카테고리

도움말 센터File Exchange에서 Creating, Deleting, and Querying Graphics Objects에 대해 자세히 알아보기

제품

태그

질문:

2012년 6월 29일

Community Treasure Hunt

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

Start Hunting!

Translated by