Trouble with rate transition blocks and function-call subsystems in an interaction with a MATLAB embedded function
Show older comments
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.
Answers (1)
Kaustubha Govind
on 27 Feb 2012
0 votes
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 Comments
Linus Hamann
on 29 Feb 2012
Kaustubha Govind
on 1 Mar 2012
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".
Categories
Find more on Buffers, Switches, and Counters in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!