Hi, everybody, I got one problem when using S-function dynamic output. The input dimensions of my S function module is constant, i.e., 4, But the dimensions of my output is dynamic, it is relative to but not the same as the values of one input. Thus, my question is how I set the number of dimension for output in a dynamic or variable way. And I check the matlab document, What it says is the dimension of output is needed to be the same as the dimension of input if we get to use variable output dimensions.
You haven't mentioned if you're writing a MATLAB S-function, or a C S-function, but this page in the documentation points to demos for both types of S-functions with variable-sized outputs.
Tanks for your reply. Actully, I prefer to use Level-2 MALAB language S-function because all my sub-function are based on MALAB language. If it impossible, i have to use C Sfunction. The dimensions of my output depend on the calculation of one input value. That means, I should do a complicated calculation using that input value, then i can obtain how many dimensions of the output I should use. Is this possible?