Closed GalBarkai closed 4 years ago
Added a small change to "nicholsplotter" (see description) which improves run time. @rubindan
Using bodcases with 'showphase' or 'showmag' option turned off results in error:
>> P.bodcases('showmag',0)
Undefined function or variable 'ha'.
Error in bodeplotter (line 45)
set(ha(1), 'ColorOrder', col, 'NextPlot', 'replacechildren');
Error in qplant/bodcases (line 62)
bodeplotter(res.',w,opt,col,linespec); % plot the Bode for all cases
Fixed the problem, was referring to handle "ha(i)" even when it didn't exist, switching to simply gca solves this
bodcases now deletes content of existing figures. It is a problem when used to show response on top of specification. example from example.mlx
:
spec2.show('freq'); hold on % show the specs.
T.bodcases([],w_nom,'showphase',0)
Fixed the overwrite, it creates a shift of the colors in "col" by 1, which is not a major issue but I'm still thinking about how to solve it
Plotting with matrices greatly enhances performance. The original version looped twice on all the cases while running "hold" in each iteration. Tested on the simple SISO example parameters on my machine performance of the original "P.bodcases()" was 12.209 seconds, with this version run time is down to 3.862 seconds. @rubindan