How to open the simulink file using command

200 Ansichten (letzte 30 Tage)
Ravi
Ravi am 13 Nov. 2016
Kommentiert: Aik-Siong Koh am 4 Jan. 2021
i have a simulink file named r.mdl. It is saved in desktop location. How can i open that file using command, in command window.

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 13 Nov. 2016
open_system() passing in the file name, including directory if it is not in your current directory.
  1 Kommentar
Michael Bernard
Michael Bernard am 14 Nov. 2016
Bearbeitet: Michael Bernard am 14 Nov. 2016
open_system('name of file') Then press enter.Good luck :)

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

Zhe Chen
Zhe Chen am 10 Mai 2020
you can just type the name of the model file (without the extension name) on the command line. There is no need to use the function 'open_system'.
  2 Kommentare
Ravi
Ravi am 10 Mai 2020
Thanks
Aik-Siong Koh
Aik-Siong Koh am 4 Jan. 2021
>> open_system('matlab/test/toolbox/simulink/sampletimes/explicitPartitioning/shared/models/mInvalidPartitionNissanPortNameConflict.slx')
Above works fine. But below doesn't. Please advise. Thanks.
>> matlab/test/toolbox/simulink/sampletimes/explicitPartitioning/shared/models/mInvalidPartitionNissanPortNameConflict
Execution of script matlab as a function is not supported:
/local-ssd/akoh/4544a/matlab/toolbox/matlab/general/matlab.m

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Programmatic Model Editing finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by