Trouble with rate transition blocks and function-call subsystems in an interaction with a MATLAB embedded function
이전 댓글 표시
Hi I have a a large array of images that I am sending to a MATLAB embedded function with a rate transition block in between however I keep getting the following error:
MATLAB Function Interface Error: Block 'StrangeAlgorithim/Rate Transition' contains states that require resetting whenever the input signal sizes vary. This block property is inconsistent with a block property of 'StrangeAlgorithim/MATLAB Function2/ SFunction '; the output signal sizes of block 'StrangeAlgorithim/MATLAB Function2/ SFunction ' depend on its input signal values. Consider placing 'StrangeAlgorithim/Rate Transition' in an Enabled/Function-Call/Action Subsystem and setting the parameter 'Propagate sizes of variable-size signals' on the corresponding control port block to: 'Only when enabling' for an Enabled or a Function-Call Subsystem; or 'Only when execution is resumed' for an Action Subsystem.
I have tried to take the error's advice and establish a function-call system however I am having trouble setting up. I also tried triggers in the function block and changing the sample-times but I keep getting the same error. Any help would be appreciated. Thank you for your time.
답변 (1개)
Kaustubha Govind
2012년 2월 27일
0 개 추천
What error do you see when you put the block inside a Function-Call subsystem? I would recommend this configuration on the function call port:
- States when enabling: reset
- Propagate sizes of variable-size signals: Only when enabling
- Sample time type: periodic
Also, the "Sample time" should match that of the function-call generator that you are using as trigger. Chose the sample time that you need the MATLAB Function block to run at.
댓글 수: 2
Linus Hamann
2012년 2월 29일
Kaustubha Govind
2012년 3월 1일
You need to configure the MATLAB Function block for variable-size signals. Open the block and select Tools>Edit Data/Ports. Then select your variable-size input in the left pane, and in the right pane select the "Variable-size signal" checbox and enter the maximum size of the signal in "Size".
카테고리
도움말 센터 및 File Exchange에서 Event Functions에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!