'sym' returns val = k11
显示 更早的评论
I am trying to obtain each of the k values in the K_bar matrix but it returns this instead:
val =
k12
A_bar and B_bar are 6x6 and 6x2 matrices respectively, desired_A is a 6x6 matrix
syms k11 k12 k13 k14 k15 k16 k21 k22 k23 k24 k25 k26
K_bar = [k11 k12 k13 k14 k15 k16; k21 k22 k23 k24 k25 k26];
desired_A = [0 1 0 0 0 0;
0 0 1 0 0 0;
0 0 0 1 0 0;
0 0 0 0 1 0;
0 0 0 0 0 1;
P_1(1,1) P_1(2,1) P_1(3,1) P_1(4,1) P_1(5,1) P_1(6,1)];
solve(A_bar-B_bar*K_bar == desired_A)
2 个评论
Torsten
2022-10-26
We cannot run your code since P_1, A_bar and B_bar are not included.
Specify the variables to be solved for in the solve-command:
solve(A_bar-B_bar*K_bar == desired_A,[....])
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Numeric Solvers 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!