[Scilab-users] bug in function iir ?
grivet
grivet at cnrs-orleans.fr
Thu Feb 25 18:10:07 CET 2016
Le 24/02/2016 21:40, Serge Steer a écrit :
> Le 24/02/2016 11:30, grivet a écrit :
>> I appreciate your help; however, neither suggestion works: I still
>> get the same error message.
>> The similar line
>> [frq,repf]=repfreq(hz,0.01,0.49);
>> has no problem
> please can you save the hz value using the Scilab save function and
> send the file?
> Serge
>>>
Voila le code:
//filtre Butterworth
Order = 2; // The order of the filter
Fs = 1000; // The sampling frequency
Fcutoff = 40; // The cutoff frequency
// We design a low pass Butterworth filter
hz = iir(Order,'lp','butt',Fcutoff/Fs/2,[0.1 0.1]);
// We compute the frequency response of the filter
[frq,repf]=repfreq(hz,0,0.5);
[db_repf, phi_repf] = dbphi(repf);
// And plot the bode like representation of the digital filter
subplot(2,1,1);
plot2d(Fs*frq,db_repf);
xtitle('Obtained Frequency Response (Magnitude)');
subplot(2,1,2);
plot2d(Fs*frq,phi_repf);
xtitle('Obtained Frequency Response (Phase in degree)');
iir est sauvegardé dans "svgd_iir" joint (binaire).
Cordialement,
JP Grivet
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20160225/6f5720c1/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: svgd_iir
Type: application/octet-stream
Size: 12608 bytes
Desc: not available
URL: <https://lists.scilab.org/pipermail/users/attachments/20160225/6f5720c1/attachment.obj>
More information about the users
mailing list