Simulink input output from m file
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
James
am 29 Dez. 2011
Kommentiert: Long Pham Van
am 27 Mär. 2019
Given an input a=[1 2 3] in an m file.
how do I run simulink WITH THE INPUT? Please dont suggest using workspace.
the obvious way to run simulink is sim('model',..) but how do I insert my input? In fact, the depreciated method is exactly what I need..
[T,X,Y] =sim('model',Timespan, Options, UT)
where UT is a matrix of time and input, T, X,Y is output. This is just like a matlab function. If it is depreciated what is the equivalent way to do it? The new sim command has syntax
SimOut = sim('model', Parameters)
is there any way to place my input into parameters?
Thanks!
0 Kommentare
Akzeptierte Antwort
Kaustubha Govind
am 29 Dez. 2011
I suppose you could use the Input parameters to specify inputs with the ExternalInput property. You might also want to set 'SrcWorkspace' to 'current' if you want Simulink to look for those input variables in the calling function's workspace.
0 Kommentare
Weitere Antworten (1)
Siehe auch
Kategorien
Mehr zu Simulink Environment Customization finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!