I'm having an issue getting my GUI and Simulink model to place nice together.
My GUI has a great many fields that the user can customize with input, values for k0, k1, k2, b0, b1 etc.
Upon pressing a button, my GUI should call a simulink model that I have already made to evaluate the system.
My problem is that when I run the sim('modelname') command (with modelname replaced by my own model's name), the variables I have in the workspace aren't passed along, so MATLAB tells me "error evaluating parameter..." and "undefined function or variable 'k0' for all the variables I had just imported from my GUI.
I had originally looked around and tried to pass them to simulink, creating a parameter variable that has parameter.k0 = k0; etc for all the values and then running sim('modelname', parameter); however, this gives me the error block_diagram does not have a parameter named "L".
How do I run my Simulink model from my GUI using the variables it needs in the correct workspace?