Created
June 18, 2010 04:22
-
-
Save sengupta/443230 to your computer and use it in GitHub Desktop.
Generate a "Hi" 3D plot in Scilab
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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})}$') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment