MATLAB: How can you import a constant (1×1) matrix into Simulink, from Matlab workspace

importing constants

For a heat transfer model, I am using several constants in multiple places.
I want to be able to create those constants in matlab, import and use them in simulink and then if I change the value of a constant in matlab, it changes it throughout the model.
Ex: mass flow rate: mdot = 25… it is used in about 5 places. If I change it to mdot = 15, it changes in all the mdot constant blocks in the model.
Thanks ahead of time! Laurie

Best Answer

  • Have you tried a constant block from Simulink/Sources?