user915783
user915783

Reputation: 699

setting Simulink block parameter from matlab without opening Simulink

I have Simulink moodel, and it has a block parameter , which can be set as (in Matlab)

set_param('pth/_dat1', 'fileName', 'data1.wav');

But, this only works if model is first open by typing model name on matlab script.

Is it possible to set it without opening the Simulink model GUI,(like e.g we can change something in visual studio project by manipulating xml rather than GUI)

Upvotes: 2

Views: 955

Answers (1)

Phil Goddard
Phil Goddard

Reputation: 10772

See load_system, which from the doc,

load_system('sys') loads sys, where sys is the name of a
Simulink® model, into memory without making its model window visible.

Upvotes: 4

Related Questions