필터 지우기
필터 지우기

How can I use FROM WORKSPACE CYCLIC REPETITION in Simulink?

조회 수: 23 (최근 30일)
Fernando  Beltrán
Fernando Beltrán 2016년 6월 10일
답변: Preeti Sar 2019년 5월 28일
Hello, I have a question. I want to use as input a signal repeating "n " times.
I have defined the input as follows:
entrada.time = [ 0 1 2 3 4 5 6 ] entrada.signals.values = [ 0 5 3 8 6 2 0 ]
I Know how to use the block "repeting sequence" , but I've seen that in the block From Workspace there is an option that is "Cyclic repetition", but me a message that says " The cyclic option is supported only When the data is in the form appears with a structure of an empty vector time . "
What I have to change my input signal?
Thank you very much

채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2016년 6월 10일
When you choose cyclic option, set your variable in the bloc "from worskspace" like below:
y.time=[ ]
y.signals.values=[ 0 5 3 8 6 2 0 ]'
y.signals.dimensions=1
Uncheck the option: "Interpolate data"
Don't forget to set the sample time, in your case it's 1
  댓글 수: 2
Fernando  Beltrán
Fernando Beltrán 2016년 6월 11일
But in the case that the step is not constant, for example, the time table is:
y.time = [0 1 4 4.5 5 9 10] ' y.signals.values = [0 4 6 5 4 2.3 5] '
How should I define the variable in the workspace and options should be changed in the FROM WORKSPACE block?
Thanks
Azzi Abdelmalek
Azzi Abdelmalek 2016년 6월 11일
In this case, try another solution, the repeating sequence for example.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Preeti Sar
Preeti Sar 2019년 5월 28일
Save your input data to workspace first and save it as a structure without time option.

카테고리

Help CenterFile Exchange에서 Modeling에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by