필터 지우기
필터 지우기

Level 2 S Function

조회 수: 1 (최근 30일)
Pramod Kumar
Pramod Kumar 2011년 5월 11일
How to set the size of the output ports in level 2 S function to dynamic size.. ??
  댓글 수: 1
MarkB
MarkB 2011년 6월 7일
Just to make sure, would you please clarify whether you mean "dynamic" or "variable size"? The two sound quite similar, but aren't the same:
Dynamic: the port can accept a variety of possible port dimensions, but whatever dimensions are accepted are finalized and constant for the rest of the simulation.
Variable sized: These have a worst-case dimension specified, either hard-coded, or resolved in the same way as dynamic dimensions above, but during simulation,it is possible that only a subset of the worst-case dimension is used.

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

답변 (2개)

Walter Roberson
Walter Roberson 2011년 5월 11일
Possibly this earlier Question provides the answer?

Kaustubha Govind
Kaustubha Govind 2011년 5월 11일
Have you tried using:
block.SetPreCompOutPortInfoToDynamic;
In your setup function? I think that should do it.
Otherwise, as suggested in the documentation:
"... assign a value of -1 to the dimensions. In this case, you can implement the SetInputPortDimensions method to set the dimensions during signal propagation."
You can extend this information to the output port and set dimensions to -1 in the setup and implement SetOutputPortDimensions.
  댓글 수: 2
Pramod Kumar
Pramod Kumar 2011년 5월 18일
I have tried to make use of the command above, but its still not able to define the size of the vector output as dynamic :(
Kaustubha Govind
Kaustubha Govind 2011년 5월 18일
Have you tried the second technique of setting the output port dimensions to -1 and implementing SetOutputPortDimensions?

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by