Info
此问题已关闭。 请重新打开它进行编辑或回答。
Working on truss, but outputs are a bit off.
1 次查看(过去 30 天)
显示 更早的评论
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/218313/image.png)
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!