Convert following code for 3d plot in MATLAB into code for Gnuplot? -
i have following 3d plot in matlab i'm trying plot in gnuplot don't know how to. in matlab, x,y,z matrices calculated inside nested loop, plotted:
w = 50 ; ww = 0:1:w ; d = 100 ; dd = 0:1:d ; i=1:1:length(ww) j=1:1:length(dd) x(i,j) = dd(i) ; % need refer array dd y(i,j) = dd(j) ; z(i,j) = <a complicated function ommitted simplicity> end end plot3(x,y,z) how plot above in gnuplot? need arbitrary values of w , d. understand need splot function @ loss how implement calculation of x,y,z matrices. appreciated!
edit: seems above can done using array , word keywords/function haven't been able implement yet
in gnuplot, set ranges , plot function:
set xrange [0:50] set yrange [0:100] z(x,y) = exp(-(x**2 + y**2)/100.0) splot z(x, y) if want change grid, use set isosamples that, like
set isosamples 51,101