![]() If the delay is expected, then you can insert a Function-Call Feedback Latch block to explicitly specify it. If the delay was not expected, you can rearrange the order of your function-calls. If you use the Function-Call Split block, you will get a clear error message explaining your options. When this happens in a large model, it might not be obvious to the user that there is an implicit delay because A runs before B, but requires data from B. If you implement the following model, it will simulate and generate code without error or warning. To split a function call from one of those, you need to use the Function-Call Split block. If you try the same with a function-call generated by a MATLAB Function block or a Stateflow chart, you will get an error. resulting in a not very obvious case of scalar expansion. As shown in the image below, a dimension 2 is specified in the Demux block and back-propagated to the Function-Call Generator. How to use gsplit by block generator#it is the Function-Call generator block that generates 2 function calls. To be accurate, in that case we need to notice that the Demux block does not split one function call. In the previous model, the Demux block can be used to split the function-call because it originates from the Function-Call Generator block. I personally think that there are many reasons why you should always use the Function-Call Split block and avoid using the Demux block to manipulate Function-call signals. For example, in the following model the Demux block can be used to obtain results similar to the Function-Call Split block. On one side, the user claimed that there was no need for a Function-Call Split block. Today I had a good discussion with a user regarding the Function-Call Split block introduced in R2010a. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |