public
Last active

Generate a "Hi" 3D plot in Scilab

  • Download Gist
hi.sce
Scilab
1 2 3 4 5 6 7 8
x = linspace(-3,3,50);
y = linspace(-5,5,50);
[X Y]=meshgrid(x,y);
Z = exp(-X.^2-Y.^2/2).*cos(4*X) + exp(-3*((X+0.5).^2+Y.^2/2));
Z(Z>0.001)=0.001;
Z(Z<-0)=0;
surf(X,Y,Z);
title('$e^{-x^2 - \frac{y^2}{2}}\cos(4x) + e^{-3((x+0.5)^2+\frac{y^2}{2})}$')

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.