I made a simulink model with four variables in it.
The code
var1 = 0.14var2 = 0.35var3 = 1000000var4 = 1000I = sim('modelname.slx')
works properly, but when I wrap this up in the function like
function I = mdlname(var1, var2, var3, var4) I = sim('modelname.slx')endmdlname(0.14, 0.35, 1000000, 1000)
It says that the model was called with an invalid flag.
Why is this happening?
Best Answer