Can I input an m file into a simulink model as a function block? If so, how?
2 views (last 30 days)
I am currently working on a final year project exploring maglev energy harvesters. I have modelled the mechanical (similar to a quarter car model) and electrical (electrical circuit connected to coil) equations in simulink.
I have a matlab script which details a function for the electromagnetic coupling factor of the coil. I was wondering if there was a way of inputting this m file as a function block in the simulink model? There will be an input for the displacement of the magnet, as this is the only varying parameter and the other parameters (e.g. the geometrical dimensions of the coil) will remain constant.