Create custom bode plot
조회 수: 2 (최근 30일)
이전 댓글 표시
I want to create a custom bode plot. The reason for this is because we created a new type of frequency domain analysis for stochastic systems and we are able to compute the variance, and thus the standard deviation, in the frequency domain.
I know I can create an (MIMO) bode plot without any data yet using
h = gca;
InputNames = {'Xin', 'Yin'};
OutputNames = {'Xout', 'Yout'};
h = ltiplot(h,'bode',InputNames,OutputNames,[],cstprefs.tbxprefs);
To make it visible, you have to use
h.Visible = 'on'
Now then I am able to select all the axes using
ax = h.getaxes;
In this case "ax" is an "axes: 2-by-2-by-2" object. It contains 8 axes, 4 for the magnitude plots and 4 for the phase plots. I can select each axes either using "ax(1) ... ax(8)" or by "ax(1,1) ... ax(2,4)"
Now I want to be able to add my own data to each of those axes. I was, for example, hoping to be able to do
semilogx(ax(1,1),freq,mag1)
semilogx(ax(1,2),freq,phase1)
semilogx(ax(1,3),freq,mag2)
semilogx(ax(1,4),freq,phase2)
...
semilogx(ax(2,4),freq,phase4)
However when I execute "semilogx(ax(1,1),freq,mag1)", the bode plot created using "ltiplot" is destroyed and only "semilogx(ax(1,1),freq,mag1)" is shown.
My question is as such, when I created a bodeplot using "ltiplot" how am I able to add data to it?
댓글 수: 0
답변 (1개)
Sulaymon Eshkabilov
2019년 5월 20일
In this case, in my understanding - not to use ltiplot(). Compute the values of Bode and plot the computed values by employing semilogx().
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Plot Customization에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!