How to pass inputs to a Simulink executable launched in the cmd
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi everyone, I have a simple Simulink model consisting in a simple sum beetwen two inputs. I created, by using Simulink coder, the executable of this model and I want to launch it in the cmd by using a file Excel containing the two inputs of the sum. As output I want the result of the sum. Is it possible?
0 Kommentare
Antworten (1)
Viren Gupta
am 24 Okt. 2018
Bearbeitet: Viren Gupta
am 24 Okt. 2018
If you have used rsim target, then you can follow the approach mentioned in the below link to add input arguments. https://www.mathworks.com/help/rtw/ug/rapid-simulations.html#brdeu57
1) Build the model with rsim.tlc as system target file
2) Collect parameters structure
>> param_struct = rsimgetrtp('myModel');
>> save myParams.mat param_struct;
3) If you wish to specify different input arguments:
>> param_struct = rsimsetrtpparam(param_struct,2);
>> param_struct.parameters{2}.values = [2 3];
>> save mymatfile.mat param_struct;
>> !myModel -p mymatfile.mat@2 -o rsim2.mat
0 Kommentare
Siehe auch
Kategorien
Mehr zu Multicore Processor Targets finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!