How to change only certain numbers in a matrices for a certain iteration?
3 views (last 30 days)
Show older comments
Hello, im struggling to understand a problem. I have solved a truss analysis by using the method of joints and turned it into a 10x10 matrix. I am solving using Ax=B form. I need to be able to find when the truss fails for a certain ultimate force at a certain m. therefore in the matrix B = [0;0;0;0;0;w;0;w;0;0]; w needs to increase from 2kg to m_max incrementing by .5 kg. This is what i have so far. I am extremely new to matlab.
A = [1 0 0 0 0 0 1 0 0 0;
0 0 0 0 0 0 0 1 0 0;
-1 0.707 0 0 -0.707 0 0 0 0 0;
0 -0.707 0 0 -0.707 -1 0 0 0 0;
0 -0.707 -1 0 0 0 0 0 0 0;
0 0.707 0 0 0 0 0 0 0 0;
0 0 1 -1 0 0 0 0 0 0;
0 0 0 0 0 1 0 0 0 0;
0 0 0 1 0.707 0 0 0 1 0;
0 0 0 0 0.707 0 0 0 0 1];
F_ult = 400
B = [0;0;0;0;0;w;0;w;0;0];
N = 100;
for w = 2:.5:N
F = A\B;
while F<<400
end
0 Comments
Answers (2)
KSSV
on 15 Feb 2022
A = [1 0 0 0 0 0 1 0 0 0;
0 0 0 0 0 0 0 1 0 0;
-1 0.707 0 0 -0.707 0 0 0 0 0;
0 -0.707 0 0 -0.707 -1 0 0 0 0;
0 -0.707 -1 0 0 0 0 0 0 0;
0 0.707 0 0 0 0 0 0 0 0;
0 0 1 -1 0 0 0 0 0 0;
0 0 0 0 0 1 0 0 0 0;
0 0 0 1 0.707 0 0 0 1 0;
0 0 0 0 0.707 0 0 0 0 1];
F_ult = 400 ;
N = 100;
iter = 0 ;
x = zeros(10,[]) ; % save deformations for each iteration
for w = 2:.5:N
iter = iter+1 ;
B = [0;0;0;0;0;w;0;w;0;0];
x(:,iter) = A\B; % save deformations for each w
end
0 Comments
Walter Roberson
on 15 Feb 2022
Edited: Walter Roberson
on 15 Feb 2022
A = [1 0 0 0 0 0 1 0 0 0;
0 0 0 0 0 0 0 1 0 0;
-1 0.707 0 0 -0.707 0 0 0 0 0;
0 -0.707 0 0 -0.707 -1 0 0 0 0;
0 -0.707 -1 0 0 0 0 0 0 0;
0 0.707 0 0 0 0 0 0 0 0;
0 0 1 -1 0 0 0 0 0 0;
0 0 0 0 0 1 0 0 0 0;
0 0 0 1 0.707 0 0 0 1 0;
0 0 0 0 0.707 0 0 0 0 1];
F_ult = 400
syms w positive
B = [0;0;0;0;0;w;0;w;0;0];
F = A\B
maxF_ratio = max(abs(F/w))
breaking_w_exact = double(F_ult / maxF_ratio)
breaking_w = ceil(breaking_w_exact / 0.5) * 0.5
That is, 133.0 would not be enough to break it, and you are incrementing by 0.5, so the number you are looking for is 133.5
I assumed here that a -400 force would also break the system.
0 Comments
See Also
Categories
Find more on Structural Analysis in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!