How to use an s - function to write a multivariable matrix ?
2 views (last 30 days)
Show older comments
Helo,
I must communicate my system with xPC in HiL in Matlab 2016 and I have a problem to write matrix KK=[3x6]. When I write this in 'gain' block in Simulink: [1.458e+003 0 -0.0004e+003 -0.7332e+003 0 0.0002e+003; 0.0001e+003 1.6243e+003 -0.0058e+003 0 -0.847e+003 0.0034e+003; -0.0052e+003 -0.0016e+003 0.4215e+003 0.003e+003 0.001e+003 -0.2194e+003] and I try to work in xPC, Simulink has an error and doesn't work ( thing is, it used to work exactly like this in Matlab 2012b ). I think when I will write this matrix in .c file maybe it will work. The example in 'stvmgain.c' has gain as a variable, is it possible to use gain matrix instead ? Any advice please ? Thank you and Regards, Monika R.
0 Comments
Answers (0)
See Also
Categories
Find more on Communications Toolbox 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!