Ayuda con meshgrid
Publicado por Cristian (6 intervenciones) el 07/06/2010 02:28:51
Gente, tengo que graficar este ejercicio y me tira este error:
>> %TP0EJ05: Emplear las herramientas "meshgrid" y "surf"
clear
x=-3:0.3:3;
y=x;
[X,Y]=meshgrid(x,y);
Z=X.^2.*exp(Y.^2-X.^2);
W=y.*sin(Y.^2-X.^2);
subplot(2,1,1); surf(Z)
colorbar
title('Z=X.^2.*exp(Y.^2- X.^2); X=[-3:0.3:3]; Y=X')
subplot(2,1,2); surf(W)
colorbar
title('W=Y.*SEN(Y.^2- X.^2); X=[-3:0.3:3]; Y=X')
??? Error using ==> times
Matrix dimensions must agree.
Alguien puede ayudarme??
Gracias
>> %TP0EJ05: Emplear las herramientas "meshgrid" y "surf"
clear
x=-3:0.3:3;
y=x;
[X,Y]=meshgrid(x,y);
Z=X.^2.*exp(Y.^2-X.^2);
W=y.*sin(Y.^2-X.^2);
subplot(2,1,1); surf(Z)
colorbar
title('Z=X.^2.*exp(Y.^2- X.^2); X=[-3:0.3:3]; Y=X')
subplot(2,1,2); surf(W)
colorbar
title('W=Y.*SEN(Y.^2- X.^2); X=[-3:0.3:3]; Y=X')
??? Error using ==> times
Matrix dimensions must agree.
Alguien puede ayudarme??
Gracias
Valora esta pregunta


0