Is it possible to export a solution to a variable in simulink for further use (eg. transfer fcn) in the same model?

1 view (last 30 days)
With the use of a submodel there are some coefficients (A,B,C,E,k) calculated. Is it possible to export this coefficients to a variable (they change with the time) which can be used in a transferfunction? Calculation of coefficients:
for use in a transferfunction like this:
Is this possible?
Kind reagers, Jan M
  3 Comments
Jan Meubels
Jan Meubels on 27 Mar 2015
I don't really understand what you mean. The only assign functions that I can find have 2 inputs to start with.
arun kumar
arun kumar on 30 Mar 2015
so for example if you want to assign the variable to the base ,(so for example you want A and B to be saved) then use assignin('base', 'TEST', A);
this will save the A's value under the variable name 'TEST' in workspace. so in your workspace you can find TEST and this will have the data of A

Sign in to comment.

Answers (0)

Categories

Find more on Programmatic Model Editing in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!