mike issa 0 Light Poster

hi all,
i have a matlab problem when i write this program (which is simple :) since im a beginner)


clear all
close all
clc
[x,y]=meshgrid(-2:.1:2);
z=x.*exp(-((x-y.^2).^2+y.^2));
mesh(x,y,z),title('mesh'):)
hidden off
colormap hot % cool,bone,copper,pink,jet,gray
colorbar
figure
contour(x,y,z),title('contour')
figure
surf(x,y,z),title('surf')
figure
meshc(x,y,z),title('meshc')
figure
meshz(x,y,z),title('meshz')
figure
surfc(x,y,z),title('surfc')
figure
waterfall(x,y,z),title('waterfall')

it gives me an error message


??? Attempt to execute SCRIPT mesh as a function.
Error in ==> lec5 at 6
mesh(x,y,z),title('mesh')

where lec5 is the name of the program and 6 is program line 6 where i placed a smiling face adjacent to it.Can any one help resolve this problem.
thanks for all..

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.