How to plot 3D surface using surf [y*(3x^2+y^2)] / (x^2+y^2)^2 ?
Show older comments
I have used the following command .
[X,Y] = meshgrid(1:0.5:10,1:20);
Z =(Y*((3*(X.^2) + Y.^2) )/((X.^2 + Y.^2).^2));
surf(X,Y,Z)
This is the error which I am getting
Error using *
Inner matrix dimensions must agree.
Error in Mse302 (line 2)
Z =(Y*((3*(X.^2) + Y.^2) )/((X.^2 + Y.^2).^2));
Accepted Answer
More Answers (1)
DASHRATH
on 6 Sep 2022
[X,Y] = meshgrid(1:0.5:10,1:20);
Z = (Y .* ((3*(X.^2) + Y.^2) ) ./ ((X.^2 + Y.^2).^2));
surf(X,Y,Z)
Categories
Find more on Surface and Mesh Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!