Plotting a graph with X-axis different from 'time' on SIMULINK

12 ビュー (過去 30 日間)
Prateek
Prateek 2011 年 11 月 12 日
コメント済み: Fangjun Jiang 2021 年 2 月 8 日
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.

回答 (1 件)

Fangjun Jiang
Fangjun Jiang 2011 年 11 月 12 日
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 件のコメント
Cyril CRIER
Cyril CRIER 2021 年 2 月 8 日
編集済み: Cyril CRIER 2021 年 2 月 8 日
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
Fangjun Jiang 2021 年 2 月 8 日
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.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeConverters (High Power) についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by