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.
Hi,Kaustubha, good to receive ur reply, I am a PhD student, what the computer and matlab software i used are from uni., thus, here i have no idea how to associate my liscence with avtivate key (i know my liscence with avtivate key), even i tried, i can not access the the content you attached before. I have sent the email to ur customer support, but still not any response. could you send me some document (word, pdf or whatever) about that, my email: yiqi.liu@awmc.uq.edu.au
Yiqi: What version of MATLAB are you using? Are you saying that when you enter "msfcndemo_varsize" at your MATLAB prompt, the demo doesn't open up? Note that variable-size signals were introduced in Simulink in R2009b, so if you don't have access to that model, it is likely that you are using an older version, and cannot avail of this feature.
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?
0 Comments