Ayuda funcion surf
Publicado por DvS (4 intervenciones) el 05/11/2009 12:12:48
Estoy intentando usar la funcion surf para realizar un diagrama 3d y tengo algun fallo que no consigo ver. El codigo es el siguiente:
tita=linspace(-pi/2,pi/2,100);
rho=linspace(0,2*pi,100);
h=ent*pi; %ent es un parametro de entrada de la funcion
fun=(cos(h*cos(tita))-cos(h))./sin(tita);
aux=fun.^2;
sol=aux./max(aux);
%paso a parametricas
x=sol.*sin(tita).*cos(rho);
y=sol.*sin(tita).*sin(rho);
z=sol.*cos(tita);
surf(x,y,z)
Y me da un warning
Warning: Matrix dimensions must agree, not rendering mesh.
A ver si alguien puede ayudarme..
tita=linspace(-pi/2,pi/2,100);
rho=linspace(0,2*pi,100);
h=ent*pi; %ent es un parametro de entrada de la funcion
fun=(cos(h*cos(tita))-cos(h))./sin(tita);
aux=fun.^2;
sol=aux./max(aux);
%paso a parametricas
x=sol.*sin(tita).*cos(rho);
y=sol.*sin(tita).*sin(rho);
z=sol.*cos(tita);
surf(x,y,z)
Y me da un warning
Warning: Matrix dimensions must agree, not rendering mesh.
A ver si alguien puede ayudarme..
Valora esta pregunta


0