Plotting a graph with X-axis different from 'time' on SIMULINK
12 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I have two scopes in the Simulink model, one giving Voltage as the output against time and the other showing Current as the output against time. Please help me in plotting Voltage and Current on the same graph, i.e, Voltage against Current.
0 commentaires
Réponses (1)
Fangjun Jiang
le 12 Nov 2011
If you want to show Voltage vs. time and Current vs. time in one scope, click the property of the Scope block, change the "Number of axes" from 1 to 2.
If you want to show Voltage vs. Current, or vice visa, use the "XY Graph" block.
2 commentaires
Cyril CRIER
le 8 Fév 2021
Modifié(e) : Cyril CRIER
le 8 Fév 2021
hello,
Quite old topic.
I try to use a "XY Graph" (Voltage vs. Current example", but I get an error because the XY Graph does accept only scalar... I wan to display 2 Array (Column Vectors).
EDIT: Hier is What I see when I look under the mask of XYGraph

And these error:

Is there a trick to correct this?
Thanks
Fangjun Jiang
le 8 Fév 2021
Not sure what you mean by "display 2 Array (Column Vectors)".
At any one time stamp, the "XY Graph" accept two values, one for X and one for Y.
Do you mean to provode those 100 data points at 100 time stamps, e.g. 0 to 99 seconds? Open the document for "XY Graph" and look at an example.
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!