From: Matt kloepfer on 8 Apr 2010 11:48 Hello, I have a one row array of numbers and would like to input that instead of modifying it into two rows per the .mat input requirement. Is there another way to input data into Simulink? I haven't found one. Thanks, Matt
From: Guy Rouleau on 8 Apr 2010 18:13 "Matt kloepfer" <kloepm(a)gmail.com> wrote in message <hpktrn$msl$1(a)fred.mathworks.com>... > Hello, > > I have a one row array of numbers and would like to input that instead of modifying it into two rows per the .mat input requirement. > > Is there another way to input data into Simulink? I haven't found one. > > Thanks, > > Matt In most cases, you always need to specify the time at which you want your data to be input into Simulink. As you figured out, this is the reason for the first row. 2 things you can do; - if you want to input all your vector on the first time step of the simulation and have it available through the whole simulation, use a constant block - Use a Inport block and a structure. In the link below, look for the section "Importing Signal-Only Structures". This is the only way I know to not specify a time vector so that Simulink will take one sample of your vector per sample time. http://www.mathworks.com/access/helpdesk/help/toolbox/simulink/ug/f11-46817.html#f11-46829 Thanks to Seth Popinchalk for showing me this last technique a few years ago! I hope this helps Guy
|
Pages: 1 Prev: Simulink FFT Next: how to change the space between bars of different columns in bar3() |