How to specify output type as "structure with time" instead of default "array" in the sim command?

4 views (last 30 days)
I am trying to use sim command to run simulink models from the command line. The sim command format that I am using in my current code is specified below: [T,X,A]=sim(model,[],[],Input_1,Input_2......) where Input_1 refers first input and so on. I am specifying each input as [time,value] list.
The issue is that when I execute using this command, I get an error which states that MATLAB makes the default output format as an array and then it asks to specify the output either as "structure" or "structure with time" format by going to configuration parameters options and doing the necessary changes.
I have tried using that technique as well but it still shows the same error. Is there any way of specifying the output format as "structure"/"structure with time" in the sim command that I have written above??

Answers (1)

Mark McBroom
Mark McBroom on 10 Mar 2018
See help for sim command. Use SAveFormat = 'StructureWithTime'

Categories

Find more on Programmatic Model Editing in Help Center and File Exchange

Tags

No tags entered yet.

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!