Creating a matrix with some unknown and some known values
19 次查看(过去 30 天)
显示 更早的评论
I have to create matrices B and C which have some known values and some unknowns, and use them in an equation like A*B=C (A has all known values).
How can I define variables for these unknowns in Matlab and then solve for them? In other posts I saw that a few people have recommended using the sym function but I had trouble understanding how I can use it for my application. Any help is appriciated, thank you!
采纳的回答
Star Strider
2014-9-26
This is how I would do it:
syms A B C
B = sym('B%d%d', [3 3])
B(1,1) = 3; B(2,3) = 5; B(3,2) = 7;
A = randi(10,3,3);
C = A*B;
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Assumptions 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!