MATLAB Answers

To plot two bode diagrams, one is obtained from linearization tool and the other one is obtained from calculated transfer function, in a single figure.

3 views (last 30 days)
Yugal Gupta
Yugal Gupta on 4 Nov 2020
Answered: Paul on 5 Nov 2020
I have done linearization of my simulink model using 'Model Linearizer' tool. Now I want to have two bode plots, one is obtained from this linear analysis and the other one is obtained using calculated transfer function in a single figure. I am able to have these bode plots in two saparate files but not able to plot them together in single figure. I tried 'hold on' function while plotting the bode diagram of calculated transfer function but it is not giving the desired results. Can you please give me some suggestions to plot them together ?
I think if I can extract the data from results of linearization and bring it to the Matlab worksapce then it may work. Can you please guide me how to do that ?
Thank You.

Accepted Answer

Paul on 5 Nov 2020
There should be a Data Browser pane on the left side of the Linear Analysis Tool window. If you can't see the pane, then you might need to click the Data Browser tab on the left edge of the window and Restore it. Once you have the Data Browser open you can click and drag variables from the Base Workspace into the Linear Analysis Worksapce or go the other way. If you're working in the base workspace, you can make your Bode plot at the Matlab command prompt:
>> bode(sys1,sys2) % or use any other options of the bode command
If you want to work in the Linear Analysis Tool, highlight the variables you want in the Data Browswer -> Linear Analysis Workspapce pane and then select the plot you want under the Plots and Results tab.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!