Info

This question is closed. Reopen it to edit or answer.

Working on truss, but outputs are a bit off.

1 view (last 30 days)
Jaeyoung Lee
Jaeyoung Lee on 6 May 2019
Closed: MATLAB Answer Bot on 20 Aug 2021
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

Answers (1)

Steven Lord
Steven Lord on 6 May 2019
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.
  4 Comments
Jaeyoung Lee
Jaeyoung Lee on 6 May 2019
2.109
-1.4913
1.4913
3.1634
-1.0545
-2.9825
-1.4913
0.74563
0.74563
-2.2369
this is what i get
Jaeyoung Lee
Jaeyoung Lee on 6 May 2019
So i am supposed to "Fac = -1000; Fbc = 1000; Fbe = -707.107; Fbd = 2121.32; Fce = -1000; Fde = 500; Rdx = -2000; Rdy = -1500; Rey = 1500 " for answers but i ended up having
-1414.2
1000
-1000
-2121.3
707.11
2000
1000
-500
-500
1500

This question is closed.

Products

Community Treasure Hunt

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

Start Hunting!