MATLAB Answers

Plotting in 3d

1 view (last 30 days)
Zilla Tofte
Zilla Tofte on 31 Jul 2020
Commented: madhan ravi on 31 Jul 2020
How do I plot z=1/sqrt(x^2+y^2) in Matlab?

Answers (2)

madhan ravi
madhan ravi on 31 Jul 2020
doc fsurf

Alexander
Alexander on 31 Jul 2020
x = 1:0.1:10;
y = 1:0.1:10;
[X,Y] = meshgrid(x,y);
Z=1./sqrt(X.^2+Y.^2);
imagesc(x,y,Z)
  4 Comments
madhan ravi
madhan ravi on 31 Jul 2020
surf() instead of imagesc()

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!