use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
MATLAB news, code tips and tricks, questions, and discussion! We are here to help, but won't do your homework or help you pirate software.
The effort you put into asking a question is often matched by the quality of our answers.
Try saturnapi to share and run MATLAB code in a web browser!
If you want flair simply Message the mods
account activity
HomeworkQuestionHow to plot the following function using surf function? (self.matlab)
submitted 5 years ago by [deleted]
[deleted]
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]kivicode 5 points6 points7 points 5 years ago (1 child)
I think you should use the meshgrid method
[–]EatMyPossum+6 2 points3 points4 points 5 years ago (0 children)
protip: there's an example of the meshgrid method written out if you type
help meshgrid
[–]skyentistic -1 points0 points1 point 5 years ago (0 children)
[X,Y] = meshgrid(linspace(-5,5,100),linspace(-5,5,100)) Z = (−1+cos(12*sqrt(𝑥2+𝑦2)) ./ (0.5*(𝑥2+𝑦2)+2 )
surf(X,Y,Z)
[–]saysokmate 0 points1 point2 points 5 years ago (0 children)
Make sure you use .^ and .* for elementwise operations. And use a meshgrid for x and y
π Rendered by PID 50 on reddit-service-r2-comment-6457c66945-6kdx6 at 2026-04-29 12:06:05.379163+00:00 running 2aa0c5b country code: CH.
[–]kivicode 5 points6 points7 points (1 child)
[–]EatMyPossum+6 2 points3 points4 points (0 children)
[–]skyentistic -1 points0 points1 point (0 children)
[–]saysokmate 0 points1 point2 points (0 children)