I have a Simulink project with a lot of sub-projects. I have different environments for which I need to generate code from Simulink. So I am trying to set the Target Hardware from a MATLAB script. I can change other settings just fine, but I don't know how the name of the Target Hardware parameter so I can use set_param(). I have searched for it, but can't seem to find it and it appears that there isn't one.
models = {'Model1','Model2','Model2'};
for i=1:length(models)
open(char(models(i)));
set_param(char(models(i)),'TargetLang','C++');
set_param(char(models(i)),'CodeInterfacePackaging','Nonreusable function')
set_param(char(models(i)),'MaxIdLength','63')
set_param(char(models(i)),'ZeroExternalMemoryAtStartup','off');
set_param(char(models(i)),'Toolchain','Linaro Toolchain v4.8');
save_system(char(models(i)));
end
Does anyone know how to set the Target Hardware from a MATLAB script? It doesn't have to be set_param.
EDIT
I am using MATLAB 2014a and a screen shot is below.