dB magnitude spectrum.

September 20 2011 by herclau 933
false
Maple

0


I  Presented problems for the plot "DB magnitude spectrum."
The structure of vector data spec has the following configuration,Float (-infinity), inside.

N := 64;
T := 1;

f := .25;
A := 1;
phi := 0;
n := Vector(N, -> i-1, datatype = complex[8]);

x := cos~(2*Pi*n*f*T);

X := DiscreteTransforms[FourierTransform](x, normalization = none);

magX := abs(X)

fn := Vector(N, i-> evalf((i-1)/N) );

DynamicSystems:-DiscretePlot(fn, magX, style = stem, color = blue, labels = ["Normalized Frequency (cycles per sample)", "Magnitude (Linear)"], labeldirections = ["horizontal", "vertical"]);

spec := 20*log10~(magX)

plot(<fn| spec>, view = [0 .. 1, -350 .. 50])

The expected graph is as follows:


How to do it?

Gracias

 
Loading Comments & Answers

You must be logged into your MaplePrimes account in order to post a comment. If you don't have an account, you can create an account here.

     

Forgot Your Password? Create an Account