フィルターのクリア

Why can't i create graph with two matrices in SIMULINK?

2 ビュー (過去 30 日間)
Alex Yande
Alex Yande 2019 年 3 月 15 日
回答済み: Fangjun Jiang 2019 年 3 月 15 日
I can't understand where is the missing. Is there any way to get graph of these matrices?
Thx!
  2 件のコメント
madhan ravi
madhan ravi 2019 年 3 月 15 日
could you share the screenshot of the model?
Alex Yande
Alex Yande 2019 年 3 月 15 日
gr.png

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

採用された回答

Fangjun Jiang
Fangjun Jiang 2019 年 3 月 15 日
Not sure what is the block type for the bottom one, FromWorkspace?
Anyway, you need to understand the difference between MATLAB and Simulink. In MATLAB, you do plot(1:178, rand(1,178)), all the values are already there. If 1:178 means from time 1 to time 178, then you have all your time and values already. What you do is just to display them.
In Simulink, it is different. What you saw on the diagram is what supposed to be at t=0. When you run simulation, Simulink calculates the values at next time step and the XY Graph block displays the value one at a time. Suppose you finish the simulation at t=178, then the XY Graph will be able to display all the results during this period of time.
The Constant block with value 1:178 means it provides 178 values all the time. Not sure what is the other block and what you try to do.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSimulink Functions についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by