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.

Answers (1)

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:
  1. States when enabling: reset
  2. Propagate sizes of variable-size signals: Only when enabling
  3. 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

Hello when I placed in the function call system I was given the following error on a MATLAB function block connected to the system I was originally having the error with:
MATLAB Function Interface Error: Unable to propagate the variable-size mode from the input 'Rate Transition' of 'Cloud Processing and Separation/MATLAB Function2'. This input expects a fixed-size mode. The variable-size mode originates from 'CloudAlgorithim/Cloud Processing and Separation/MATLAB Function2/ SFunction '. Examine the configurations of 'Cloud Processing and Separation/MATLAB Function2' for one of the following scenarios: 1. The block does not support variable-size signals 2. The block supports variable-size signals but needs to be configured for them. You can enable variable-sizing for 'Rate Transition' from the ports and data manager dialog.
I could also send you the model if you desired and told me your method of file exchange.
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".

Sign in to comment.

Asked:

on 25 Feb 2012

Community Treasure Hunt

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

Start Hunting!