I would like to create a simulation model from equations generated using matrices of coefficients obtained from Matlab through xget, but am unsure of the syntax to use.
I naively tried the following
' create model from dr.ghx and dr.ghu
model mod1
%eq = " "
%eq = %eq + "+" + dr_ghx(1,1) + "*" + "r(-1)" + "+" + dr_ghx(1,2) + "*" + "pi(-1)" "+" + dr_ghx(1,3) + "*" + "y(-1)" "+" + dr_ghu(1,1) + "*" + "eas" "+" + dr_ghu(1,2) + "*" + "eis" "+" + dr_ghu(1,3) + "*" + "emp"
%eq = "r =" + %eq
mod1.append %eq
but it failed, with the error message
%EQ is not defined or is an illegal command in "%EQ = " " + "+" + DR_GHX(1,1) + "*" + "R(-1)" + "+" + DR_GHX(1,2) + "*" + "PI(-1 ...
Could someone help with the correct syntax, please?
Thanks and regards
Donihue