How do I do simultaneous equations with unknown variables?

3 ビュー (過去 30 日間)
Gowutheyaan Ratnasingam
Gowutheyaan Ratnasingam 2019 年 11 月 18 日
回答済み: Siriniharika Katukam 2019 年 11 月 21 日
I have worked out a global stiffness matrix and the global force vector. After this I need to do an equation [K][q] = {f}
Where {q} =
q1
q2
q3
Where q1 is equal to zero, and the other two are values to be found, how do I find these values? When I try, Matlab keeps on saying q2 etc. are undefined. It also doesn't seem to accept F = K*Q for some reason too
Code so far:
Edof = [1 1 2; 2 2 3];
K = zeros (3,3);
F = zeros (3,1);
F (2) = 4;
F (3) = 2;
k1 = 60;
k2 = 30;
Ke1 = [k1 -k1; -k1 k1];
Ke2 = [k2 -k2; -k2 k2];
K(1:2,1:2) = Ke1;
K(2:3,2:3) = K(2:3,2:3) + Ke2;

回答 (1 件)

Siriniharika Katukam
Siriniharika Katukam 2019 年 11 月 21 日
Hi
"linsolve" does the solving in your case.
Pass K and f as inputs to linsolve.
Do follow this link further:

カテゴリ

Help Center および File ExchangeProgramming についてさらに検索

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by