help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Plot Problems


From: Marize Simoes
Subject: Plot Problems
Date: Fri, 29 Aug 2008 22:23:41 -0300 (Hora oficial do Brasil)

 
 
-------Mensagem original-------
 
Data: 29/08/2008 22:04:34
Assunto: Plot Problems
 
Hi user's
 
I need help for plotting
I don't  know save plot
I need to save in eps..
I'm use octave 3.0.0
My program is.....
Why don't save eps????
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%              wavelet de Batle-Lemarie                     %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
close all
clear all
clc
 

 
%GAMA
gama2=[-0.4635797105 0.8409668205 -0.4635797105 0.002475957549 0.03872014803 0.01189047808 -0.009820383628 -0.002320434165 0.002063424725 0.0005998870197 -0.0004905807506 -0.0001457430704 -0.0001175190853 0.00003644943411 -0.00002884828695 -0.000009149625089];
gama3=[-0.6982039311 1.093504740 -0.6982039311 0.1067636030 0.04157237841 0.03344218155 -0.03408059105 -0.005051746849 0.008917848757 0.003554291285 -0.003865855446 -0.001198514983 0.001407777305 0.0005323656132 -0.0005646593665 -0.0002070307864];
gama4=[1.002605289 1.445867055 1.002605289 0.2711395073 -0.006035702811 0.07204433308 -0.07295624620 0.001509181419 0.01417196409 0.009574629656 -0.011 23099156 -0.002482451693 0.004165162504 0.001926453123 -0.02352521366];
%gama5=[]
%gama6=[]
%gama7=[]
%gama9=[]
%gama10=[]
gama8=[-4.118882910 5.002466701 -4.118882910 2.383541834 -1.243498182 0.9103832872 -0.7099010602 0.3895514128 -0.2013127237 0.1969221774 -0.1719501984 0.07805884517 -0.03288650044 0.05210296102 -0.05021436082 0.01522532735];
 

%ordem da função
ordem=input('Entre com a ordem desejada de 2 a 10: ');
ordem
 
%Considerando o GAMA
switch(ordem)
  case 2
     gama=gama2;
   case 3
     gama=gama3;
    case 4
     gama=gama4;
  case 5
     gama=gama5;
  case 6
     gama=gama6;
  case 7
     gama=gama7;
  case 8
     gama=gama8;
  case 9
     gama=gama9;
  case 10
     gama=gama10;
  otherwise
     printf('Erro');
endswitch 
 
t=linspace(-2*pi,2*pi,1024);
invpsi=zeros(1,length(t));
 

%calculo de Bm(w)
for w=1:length(t)
    for k=1:15
        Bm=(sin(t(w)/4)/(t(w)/4))^ordem;
        invpsi(w)=invpsi(w)+gama(k)*exp(-i*k*t(w))*Bm;
    end
end
 

 
% inv1=ifft(psi);
psi=ifft(invpsi);
 
%Deslocamento da Saída
for i=1:length(psi)/2
   coef1(i)=psi(i);
end
for i=(length(psi)/2)+1:length(psi)
  coef2(i-(length(psi)/2))=psi(i);
end
coef1=fliplr(coef1);
coef2=fliplr(coef2);
psi=horzcat(coef1,coef2);
psi=fliplr(psi);
 

%**** Plot ****
__gnuplot_set__ ("terminal postscript color enhanced")
__gnuplot_set__ ("output 'gama2.eps'")
__gnuplot_set__ ("xlabel 't'");
__gnuplot_set__ ("ylabel 'psi'");
 
plot (t,psi)
switch(ordem)
  case 2
      x=0.2;
   case 3
      x=0.5;
   case 4
      x=0.5;
   case 5
      x=0.4;
   case 6
      x=0.4;
   case 7
      x=0.5;
   case 8
      x=0.5;
   case 9
      x=0.5;
   case 10
      x=0.5;
  otherwise
     disp("\n 'Erro '")
  endswitch 
  axis ([-x x])
 
 
 
 
 

Marize Simões
Mestranda em Computação Aplicada
Instituto Nacional de Pesquisas Espaciais - INPE
Tel: +55 12 3945-6356
Animacoes GRATUITAS para seu e-mail – do IncrediMail! Clique aqui!

reply via email to

[Prev in Thread] Current Thread [Next in Thread]