Finding linear combination between 3 vectors
59 次查看(过去 30 天)
显示 更早的评论
回答(1 个)
Sufiyan
2023-4-25
Hi,
You can refer to the below code to find linear combination between three vectors.
a=[1 1 1]';
b=[1 2 3]';
c=[2 -1 1]';
d=[1 -2 5]';
%unknown variables
syms k1 k2 k3
%equation
eqns = (k1.*a)+(k2.*b)+(k3.*c)-d==0 ;
vars = [k1 k2 k3];
[k1, k2, k3] = solve(eqns,vars)
Hope this helps!
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Polynomials 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!