I am calling my simMech model from my matlab function using sim('mymodel.mdl') in a matlab function file. Only problem is that the model cannot run because I need it to take parameters that are defined in my function (e.g. initial conditions on a joint is specified as 'jointIC' in the simMech model and in my matlab function I have jointIC = 0;) Furthermore I need to pass the outputs of the model back to my function.
I know that you can do what I have described for script files in matlab i.e the variables are passed back and forth from the matlab workspace. But in my case it is very important that I pass them via my function!
Any input would be appreciated, thanks!
Best Answer