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 Commenti

grid on
or
caxis auto
grid(cax,'on'); % too much input parameter!
Ryan
Ryan il 29 Giu 2012
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?
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!

Accedi per commentare.

Categorie

Scopri di più su Creating, Deleting, and Querying Graphics Objects in Centro assistenza e File Exchange

Prodotti

Tag

Richiesto:

il 29 Giu 2012

Community Treasure Hunt

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

Start Hunting!

Translated by