It’s difficult to understand what you did from your description.
See if this works:
f = @(x,y) sin(hypot(x,y)).*hypot(x,y);
x = linspace(-5*pi, 5*pi, 100);
[X,Y] = meshgrid(x);
Z = f(X,Y);
figure(1)
surfc(X, Y, Z)
grid on
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!