Floating-Point to Fixed-Point Conversion of IIR Filters

2 visualizzazioni (ultimi 30 giorni)
I am trying to run this official example https://fr.mathworks.com/help/dsp/ug/floating-point-to-fixed-point-conversion-of-iir-filters.html . But when I copy the first line
biquad = design(fdesign.lowpass('Fp,Fst,Ap,Ast',0.4,0.45,0.5,80),'ellip',FilterStructure='df1sos', SystemObject=true, UseLegacyBiquadFilter=true);
it triggers an error :
Error: Incorrect use of '=' operator. To assign a value to a variable, use '='. To compare values for equality, use '=='.
I run this version of matlab
-----------------------------------------------------------------------------------------------------
MATLAB Version: 9.9.0.1857802 (R2020b) Update 7
MATLAB License Number:
Operating System: Microsoft Windows 10 Pro Version 10.0 (Build 19044)
Java Version: Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
-----------------------------------------------------------------------------------------------------
MATLAB Version 9.9 (R2020b)
Control System Toolbox Version 10.9 (R2020b)
DSP System Toolbox Version 9.11 (R2020b)
Fixed-Point Designer Version 7.1 (R2020b)
Instrument Control Toolbox Version 4.3 (R2020b)
Parallel Computing Toolbox Version 7.3 (R2020b)
RF Toolbox Version 4.0 (R2020b)
Signal Processing Toolbox Version 8.5 (R2020b)
Statistics and Machine Learning Toolbox Version 12.0 (R2020b)
How can I run this example on my computer ?

Risposta accettata

Les Beckham
Les Beckham il 3 Gen 2023
Modificato: Les Beckham il 3 Gen 2023
The Name=Value syntax for name/value pairs of function arguments only works in r2021a and above.
So, changing this:
biquad = design(fdesign.lowpass('Fp,Fst,Ap,Ast',0.4,0.45,0.5,80),'ellip',FilterStructure='df1sos', SystemObject=true, UseLegacyBiquadFilter=true);
to this:
biquad = design(fdesign.lowpass('Fp,Fst,Ap,Ast',0.4,0.45,0.5,80), 'ellip', 'FilterStructure', 'df1sos', 'SystemObject', 1, 'UseLegacyBiquadFilter', 1);
should get rid of the "Incorrect use of '=' operator" error. I'm not familiar with this filter design process so I don't know if no error means that it is working correctly.

Più risposte (1)

Andy Bartlett
Andy Bartlett il 3 Gen 2023
Hi,
Examples often depend on supporting files. To successfully run these examples, all the files needed by the example need to be on the MATLAB path. The help page for an example will have a big blue button labelled "Open Live Script." Clicking that button will make sure that copies of all the needed files are put on the current MATLAB path. Often the files are copied to a directory and the current directory is changed to that folder. These files can then be found by the commands in the example.
In contrast, if you do not click the big blue "Open Live Script" button, and copy commands from the help text and past them into MATLAB command window, then those commands can fail do to missing dependencies.
Please try clicking the "Open Live Script" button from the examples help page. Then try to repeat the individual commands, and see if that resolves the issues.
Andy
  2 Commenti
Stephane DAVID-GRIGNOT
Stephane DAVID-GRIGNOT il 3 Gen 2023
Thank you very much for your answer.
I can't see the blue "Open Live Script" button . The web page only offers to "Open in Matlab Online" (cf image). Once I open it online, the example works, but I did not find how to download the files from the online matlab to my computer. Is there a solution for running the example localy on my computer ?
thank you again
Stéphane
Stephane DAVID-GRIGNOT
Stephane DAVID-GRIGNOT il 3 Gen 2023
I have found how to dowload the example folder from matlab online. However the error is still triggered even when operating in the example folder. What am I doing wrong ?
thank you again

Accedi per commentare.

Prodotti


Release

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by