How to execute this code in simulink? Help Me ....

Status
Not open for further replies.

nnvkct

Newbie level 6
Joined
Nov 7, 2005
Messages
11
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,365
The following code creates a Simulink model that has a green canvas and a hidden toolbar and uses the ode3 solver:

function new_model(modelname)

if nargin == 0
modelname = 'my_untitled';
end

open_system(new_system(modelname));
set_param(modelname, 'ScreenColor', 'green');
set_param(modelname, 'Solver', 'ode3');
set_param(modelname, 'Toolbar', 'off');
save_system(modelname);
----------------------------------------------------------
Please explain me following questions:
- nargin (What's nargin?)
- How to execute this code in simulink?

I appreciate any help. Thanks.
 

nargin == number of arguments
Save the file as a simulink model file and create a schematic and run
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…