Create equations in a loop

6 次查看(过去 30 天)
Eddy
Eddy 2021-1-15
回答: KSSV 2021-1-15
Hi All
I want to create a system of equations from matrices and solve them. My inputs are as follows
Inputs
K = 275 * 275 matrix
F = 275 * 1 matrix
Solve for t, such that, K*t = F.
I tried the following lines but it results in an error.
syms t
Z = zeros(size(F));
for i = 1:numel(Z)
eqn = F(i)==K(1,:) * t;
Z(i) = double(vpasolve(eqn,t));
end
The equation line when displayed does not seem to be correct. Any help is highly appreciated.
Thanks

回答(1 个)

KSSV
KSSV 2021-1-15

类别

Help CenterFile Exchange 中查找有关 Symbolic Math Toolbox 的更多信息

标签

产品


版本

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by