[scilab-Users] Doubt in plot3d

Collette Yann ycollet at freesurf.fr
Sun May 17 08:13:59 CEST 2009


Try this:

x=[-1:0.01:1];
y=[-1:0.01:1];

for i=1:length(x)
  for j=1:length(y)
    g(i,j) = x(i) .* sin((4*%pi) * x(i)) - y(j) .* sin ( (4*%pi) *  y(j) 
+ %pi ) + 1;
  end
end
 
plot3d(x,y,g)

YC
 
Lucio Agostinho Rocha a écrit :
> Hi,
>
> I'm trying to plot the following function in Scilab:
>
> x=[-1:0.01:1];
> y=[-1:0.01:1];
> g = x .* sin(4 .* %pi .* x) - y .* sin ( 4 .* %pi .* y + %pi ) + 1;
> plot3d(x,y,g)
>
> but nothing is displayed. What i'm doing wrong? Someone could help me? 
> If yes, how can I put a degrade with several colors?
>
> Thanks in advance,
>
> Lucio
> ........
>
>
> ------------------------------------------------------------------------
> Veja quais são os assuntos do momento no Yahoo! + Buscados: Top 10 
> <http://br.rd.yahoo.com/mail/taglines/mail/*http://br.maisbuscados.yahoo.com/> 
> - Celebridades 
> <http://br.rd.yahoo.com/mail/taglines/mail/*http://br.maisbuscados.yahoo.com/celebridades/> 
> - Música 
> <http://br.rd.yahoo.com/mail/taglines/mail/*http://br.maisbuscados.yahoo.com/m%C3%BAsica/> 
> - Esportes 
> <http://br.rd.yahoo.com/mail/taglines/mail/*http://br.maisbuscados.yahoo.com/esportes/> 





More information about the users mailing list