Hi ,
Im trying to plot a bode plot but i get the following error.
>> bode(gamma20,{1000,1e6})
Warning: The data cannot be plotted because it is incompatible with the size of the
plot or is missing.
> In warning at 26
In wavepack.waveform.draw at 55
In wrfc.plot.draw at 18
In wrfc.plot.init_listeners>LocalRefreshPlot at 119
In DynamicSystem.bodeplot at 109
In DynamicSystem.bode at 89
Is there a way to bypass this error? I can get the tf to print and show in the command window. It shows a transfer function of degree 2000, but it will not let me plot the bode plot. In the past, i've plotted something up to degree 700 if i recall correctly. What can I do here? Can matlab reduce the size of the tf? Can I just reduce the size of the frequency sweep?
tia
4 Comments
Direct link to this comment:
http://www.mathworks.ch/matlabcentral/answers/40810#comment_83970
it seems to be the issue with having a high degree transfer function is that you have a lot of rapid change. Perhaps if there was a way to reduce the order of my transfer function, then i could form the plot?
Direct link to this comment:
http://www.mathworks.ch/matlabcentral/answers/40810#comment_84417
Are you able to get numeric output using the following?
>> [m,p]= bode(gamma20,{1000,1e6});
or trying to plot with a smaller frequency range?
>> bode(gamma20,logspace(1,2,20))
Note: Computations involving high-order transfer functions can suffer from severe loss of accuracy and even overflow.
Direct link to this comment:
http://www.mathworks.ch/matlabcentral/answers/40810#comment_87416
Hi Craig,
Sorry for the delayed reply.
I tried this, and even with logspace(1,6,10), I could not get a plot out. Something else I tried was to use minreal.
I just found it very strange that i can get a "finite" transfer function expression in the console window, but still it refuses to make the bode plot.
Do you think it is possible to increase the tolerance when using minreal? What is typically an accepted value to use besides the default value from Matlab?
Thanks for your help.
Direct link to this comment:
http://www.mathworks.ch/matlabcentral/answers/40810#comment_90606
The plotting algorithm basically calls bode to obtain its numerical values. The warning being displayed is a result of two possibilities.
If you call bode with output arguments does it error out?
>> [m,p]= bode(gamma20,{1000,1e6});Regarding using minreal, adjusting the tolerance is an engineering decision you have to make based on your problem.