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 个评论
Ilham Hardy
2012-6-29
grid on
or
caxis auto
grid(cax,'on'); % too much input parameter!
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.
2012-6-29
回答(1 个)
Sean de Wolski
2012-6-29
which -all grid
?
类别
在 帮助中心 和 File Exchange 中查找有关 Creating, Deleting, and Querying Graphics Objects 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!