geez0x1 / CompliantJointToolbox

Compliant Joint Toolbox (CJT) for MATLAB and Simulink
GNU General Public License v3.0
38 stars 14 forks source link

bode_tuyplot resample functionality #64

Open geez0x1 opened 6 years ago

geez0x1 commented 6 years ago

In some rare cases, the resample functionality of bode_tuyplot (and possibly bode2) can crash, depending on the frequency range chosen in bodeOpt.XLim:

Maximum variable size allowed by the program is exceeded.

Error in linspace (line 28)
        y = d1 + (d2./n1).*(0:n1) - (d1./n1).*(0:n1);

Error in logspace (line 25)
y = 10 .^ linspace(d1, d2, n);

Error in bode_tuyplot (line 115)
        freq_RS     = logspace(a,b,n);