Floating-Point to Fixed-Point Conversion of IIR Filters
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Stephane DAVID-GRIGNOT
el 3 de En. de 2023
Comentada: Les Beckham
el 5 de En. de 2023
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 ?
0 comentarios
Respuesta aceptada
Les Beckham
el 3 de En. de 2023
Editada: Les Beckham
el 3 de En. de 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.
2 comentarios
Más respuestas (1)
Andy Bartlett
el 3 de En. de 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 comentarios
Ver también
Categorías
Más información sobre Fixed-Point Designer en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!