How to use surf ?
Show older comments
I have a function f(i,j). How to plot a 3D graph (like surf) for f(i,j) vs x(i) vs y(j) ?
Answers (1)
Azzi Abdelmalek
on 10 May 2014
i=1:10
j=1:10
[ii,jj]=meshgrid(i,j)
x=sin(ii)
y=cos(jj)
f=x.^2+y.^2
surf(x,y,f)
Categories
Find more on 2-D and 3-D 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!