How to change the "FrequencyRange" property of the object created by "fvtool"?

10 visualizaciones (últimos 30 días)
I created an object using the "fvtool" function, and tried to change the "FrequencyRange" property.  However, when attempting to do that, I encountered the following error: 
ERROR: Error using sigdatatypes.parameter/set
There is no enumerated value named '[-0.2,0.4)'.
Error in sigdatatypes.parameter/setvalue>lclsetvalue (line 120)
set(hPrm, 'Value', value);
Error in sigdatatypes.parameter/setvalue (line 45)
[msg, wasset] = lclsetvalue(hPrm, value);
Error in sigtools.fvtool/dynpropsetfunction (line 454)
setvalue(hprm, newVal);
Error in sigtools.fvtool>@(s,e)dynpropsetfunction(s,e,hindx)

Respuesta aceptada

MathWorks Support Team
MathWorks Support Team el 15 de Nov. de 2023
Editada: MathWorks Support Team el 27 de En. de 2024
The following steps illustrate how to set the frequency range to an arbitrary value:
1) Let us assume that you have created an object "h" using the "fvtool" command, e.g. as follows:
[b,a] = ellip(6,3,50,300/500);
h = fvtool(b,a);
2) Now, modify the "FrequencyRange" property so that you can directly specify the frequency range:
h.FrequencyRange = 'Specify freq. vector';
3) Specify the desired frequencies as a row vector, e.g. as follows:
desiredFrequencyVector = linspace(0.4,0.8,100);
Note that the first and the last element define your desired frequency range.  In this vector, you are also specifying the exact data points in the plot.
4) Finally, set the "FrequencyVector" property to the variable "desiredFrequencyVector" as follows:
h.FrequencyVector = desiredFrequencyVector;
You can find more information about this in following section of the documentation for "Modifying the Plot" in "FVTool", specifically the lines about setting the "Frequency Range" and "Frequency Vector":
Please run the below command in the MATLAB R2018a command window to get the release specific documentation:
web(fullfile(docroot, 'signal/ref/fvtool.html#f7-1000742'))
You can also set these properties interactively by clicking the "Analysis" menu item in the window that opens up when "fvtool" is executed, and selecting "Analysis Parameters ...".  This is illustrated in the "Display Analysis Parameters" section of the same documentation page:
Please run the below command in the MATLAB R2018a command window to get the release specific documentation:
web(fullfile(docroot, 'signal/ref/fvtool.html#f7-1021137'))
Please follow the below link to search for the required information regarding the current release:

Más respuestas (0)

Etiquetas

Aún no se han introducido etiquetas.

Productos


Versión

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by