Selection data from Discrete Root Mean Square simulink

조회 수: 2 (최근 30일)
Emiliano Ascenzi
Emiliano Ascenzi 2020년 5월 15일
댓글: Emiliano Ascenzi 2020년 5월 18일
I have calculated the Discrete Root Mean Square of a signal in a sampling interval equal to the stopping time of the simulation. I used this block.
I applyed the to workspace block, selecting array as save format, to see how the results are (attached). I need to select only the number different from zero, I tried to use the block Selector but I didn't reach the desired output
Someone can tell me how to use Selector properly on a Discrete Root Mean Square block?
Thanks in advance

채택된 답변

Jyotsna Talluri
Jyotsna Talluri 2020년 5월 18일
As you specified that your Discrete RMS Value block generates output [0;1.0977] ,make sure you set the Input port size of the selector block as 2 and as you want to get only second element which is not zero ,set the Index vector in the Index Option as [2].Set the Number of input dimensions as 1 and Index mode as one-based.
  댓글 수: 5
Jyotsna Talluri
Jyotsna Talluri 2020년 5월 18일
Here,the issue is not with the selector block.As you set the sample time of discrete RMS Block and stop time of simulation to a certain same value,the values are computed at two time instants (t=0,t=sampletime) during simulation .To Workspace block logs the output at the each of these instants due to which you are obtaining two values.As you want only last final value as output, set the 'Limit data points to last' parameter in the 'To Workspace' block to 1 inodrder to log only final output of simlation.
Emiliano Ascenzi
Emiliano Ascenzi 2020년 5월 18일
It works now, thank you!

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Programmatic Model Editing에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by