how I can solve a linear system AX = B type, if one of the B vector data change constantly, in simulink
Show older comments
i have a linear system and i want solve this in symulink
[a b c d; e f g h; i j k l m; n o p q] *[x1;x2;x3;x4]=[y;0;s;0]
when all abcd... parameters are constants. x1,x2,x3, x4 are variables, the parameter s and y are constant too, but the parameter y will be refresh in each step of simulation.
I thought use the LU solver block , for solve the system, but i don't know how make that the s parameter change.
Answers (1)
Azzi Abdelmalek
on 21 Dec 2012
Edited: Azzi Abdelmalek
on 21 Dec 2012
You can use a Matlab function block with three inputs: one from a constant block with value set to matrix A, another from a constant block with value set to s and a third from your variable signal y

function y1 = fcn(y,s,A)
b=[y ; 0 ; s ; 0]
y1 = A\b;,
Categories
Find more on Linearization 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!