Test del espectrograma.
- Autor
- Fernando Pujaico Rivera
- Fecha
- 26-01-2012
#include <config.h>
#include <stdlib.h>
#include <pds/pdsft.h>
#include <pds/pdsvector.h>
#include <pds/pdscvector.h>
#include <math.h>
#include "extras.h"
int main(int argc, char** argv)
{
PdsVector *Vin=NULL;
PdsMatrix *M=NULL;
int id;
L=42;
N=64;
T=3;
Vin=pds_vector_new(L*T);
M=pds_matrix_new (N/2,T);
for(j=0;j<L*T;j++) Vin->V[j]=sin(2.0*M_PI*(2.0 + j/(1.0*L))*j*1.0/L);
pds_octplot_vector_in_png( Vin,
"n",
"Vin[n]",
"graficaVin.m",
"graficaVin.png"
);
pds_octplot_image_matrix_in_png( M,
"Tiempo ID",
"Frecuencia ID",
"|SPECTROGRAPH|",
"graficaM.m",
"graficaM.png"
);
pds_vector_free(Vin);
pds_matrix_free(M);
return EXIT_SUCCESS;
}