I want to plot a 3d surface in scilab with this profile: e^(-y)*cos(x). I plotted in geogebra and it gone allright, but when I try it in scilab it returns another surface that does not correspond to the geogebra plot
I was trying to plot this surface in scilab to get something like that:
But, instead, what i get is this:
my code is:
x=[-10:0.1:10]; y = [-10:0.1:10];
[X,Y] = meshgrid(x,y)
Z = (%e^(-Y)).*cos(X)
surf(X,Y,Z, 'facecol','blue','edgecol','black')
You should use exp(-Y) instead of %e^(-Y) because %e^(-Y) computes the matricial exponent instead of elementwise exponent.