matrix creation simulink block

I have a signal and its time correspondent. Is there a way of putting this signal inside a matrix in simulink so I can use it for an other application? I was trying to use a lookup table, but I don't know whether this is the way.

回答 (1 件)

Azzi Abdelmalek
Azzi Abdelmalek 2013 年 11 月 20 日
編集済み: Azzi Abdelmalek 2013 年 11 月 20 日

0 投票

t=0:100 % time vector
y=sin(t) % your signal
ty=[t' y']
Use a from workspace block and set its parameter to ty

8 件のコメント

Danilo NASCIMENTO
Danilo NASCIMENTO 2013 年 11 月 20 日
This way i know.. but the data cannot be generated in matlab. It must be generated inside simulink model.
Azzi Abdelmalek
Azzi Abdelmalek 2013 年 11 月 20 日
Can you give more details?
Danilo NASCIMENTO
Danilo NASCIMENTO 2013 年 11 月 20 日
Sure. I already have a table with a signal. I guess that must be a way of putting this table inside simulink so I can see this signal with a scope.
Azzi Abdelmalek
Azzi Abdelmalek 2013 年 11 月 20 日
This is not clear
Danilo NASCIMENTO
Danilo NASCIMENTO 2013 年 11 月 20 日
Let's say I have t a vector of 10001 elements and sint a vector with the same number of elements, I want a matrix in simulink with these elements, so I can generate this signal inside this simulation for my application. The way you performed, simulink will grab these datas everytime from matlab workspace. It cannot be done this way. It MUST be generated inside simulink.
Azzi Abdelmalek
Azzi Abdelmalek 2013 年 11 月 21 日
This is confusing, if you say that you have a 10001x1 vector, means that your vector already exist, then can't be generated by simulink
Danilo NASCIMENTO
Danilo NASCIMENTO 2013 年 11 月 21 日
No. I already have these vectors generated by an other application. And I want to use them to generate this signal in simulink. But these signal vectors are not from simulink.
Azzi Abdelmalek
Azzi Abdelmalek 2013 年 11 月 21 日
Then explain clearly what those application are, or how your vectors are stored.

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

質問済み:

2013 年 11 月 20 日

コメント済み:

2013 年 11 月 21 日

Community Treasure Hunt

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

Start Hunting!

Translated by