Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - Drawing waveform with MATLAB
Drawing waveform with MATLAB
Omega? =? 2 * pi * 100; ? % 100 Hz

OmegaC? =? 10 *ω; ? % 1000 Hz

fs? =? 10000; ? % sampling frequency

OmegaS? =? 2 * pi * fs

t=? 1/fs*linspace(0,fs*50, 1000);

f? =? 2 *( 1+0.9 * cos(ω* t)+0.3 * cos(2 *ω* t));

Law? =? f . * cos(omega c * t);

Subplots (311);

plot(t,fa);

fb? =? 0.5 * f . *( 1+cos(2 * omega c * t));

Subplot (312);

plot(t,FB);

RP = 1; As = 30

[N,WC]= but ord(2 *ω/ωs,ωc/ωs,Rp,aS)

[B, A]= butter (n, WC);

Fc = filter (b, a, FB);

Subplot (313);

plot(t,fc);