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