Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
Working on truss, but outputs are a bit off.
조회 수: 1 (최근 30일)
이전 댓글 표시
format shortG
d = sind(45);
A=[-d 0 0 0 0 0 0 0 0 0; %ab
-d -1 0 0 0 0 0 0 0 0; %ac
0 0 0 0 -d 0 0 -1 0 0; %bc
0 0 0 0 -d 0 1 0 1 0; %bd
d 0 1 -d d 0 0 0 0 0; %be
d 0 0 -d -d 0 0 0 0 0; %dx
0 0 -1 0 0 0 0 0 0 0; % ce
0 1 0 0 0 0 -1 0 0 0; % de
0 0 0 d 0 1 0 1 0 0; %Rey
0 0 0 d 0 0 0 0 0 1;]; % Rdy
b=[1000;0;0;0;0;0;1000;0;0;0];
X = linsolve(A,b)
Someone please help me to get Fab = 1414.21; Fac = -1000; Fbc = 1000; Fbe = -707.107; Fbd = 2121.32; Fce = -1000; Fde = 500; Rdx = -2000; Rdy = -1500; Rey = 1500
댓글 수: 0
답변 (1개)
Steven Lord
2019년 5월 6일
When I define a vector to contain your expected results and compute A*x-b, the residuals are quite large.
expected = [1414.21; -1000; 1000; 2121.32; -707.107; -2000; -1000; 500; 1500; -1500]
residuals = A*expected-b
residuals =
-2000
0.002519
0.00015472
1000
-0.0024308
-0.0021213
-2000
0
-0.00024293
-0.00024293
When I compute the residuals using the solution provided by linsolve they are quite small.
residualsLinsolve = A*X-b
residualsLinsolve =
0
0
0
0
3.0996e-14
8.2691e-14
1.1369e-13
0
0
0
If I use linsolve with -b instead of b, the solution matches your expected solution except for the next-to-last element, making me suspect 1) you made a typo in that next-to-last element and 2) you need to be careful about coordinate systems.
이 질문은 마감되었습니다.
참고 항목
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!