Easier way to remove a response from a response plot (bodeplot, stepplot, etc.)?

15 vues (au cours des 30 derniers jours)
Zachary
Zachary le 28 Juil 2020
Commenté : Zachary le 3 Août 2020
Is there a more convenient way to remove a response from a response plot generated using Control System Toolbox functions? I'm working with Bode diagrams, but this could apply to any response plot. After some digging, the only way I found was to a method in the resppack.bodeplot class called, rmresponse. From trial-and-error, I stumbled on a syntax...
%% Generate a Bode diagram with 2 responses
h = bodeplot(rss(1));
hold on
bodeplot(rss(1));
%% Remove the 1st response
idx = 1; %index of response to delete in the order stored in h.Responses
wave2rm = h.Responses(idx); %handle to response (waveform object)
h.rmresponse(wave2rm)
Even manually selecting the line group and pressing delete does nothing. I can hide the response using the context menu, but I'd rather remove it entirely. I'm always reluctant to rely on undocumented MATLAB features because another user will not be able to search for help. However, in this case, there just isn't much documentation on manipulating graphics produced by the Control System Toolbox.
So I was wondering if I'm missing something? Or if documentation does exist somewhere out there on these Control System Toolbox classes (i.e. resppack, wavepack, etc.)?

Réponse acceptée

Paul
Paul le 1 Août 2020
Does this do what you want:
delete(h.Responses(idx))

Plus de réponses (0)

Catégories

En savoir plus sur Time and Frequency Domain Analysis dans Help Center et File Exchange

Produits


Version

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by