I need assistance in writing a code to solve iteratively this non-linear problem that I have broken down in the example below;
Info
This question is closed. Reopen it to edit or answer.
Show older comments
Q1 = [ 25, 10, 15, 20; 10, 12, 18, 23; 12, 15, 17,19; 15 20, 16, 28 ];
F1 = [ 6;7;12;7];
F2 = [ 48;64;72;75];
iter = 0;
N = 100; % maximum number of iterations
uold = u0;
QA = Q1;
F1 = RF1;
F2 = RFM; % max load capacity
u0 = u1;
dF = 0.2;
[row,col] = size(u);
tol = 0.0001;
syms 'u'
R1 = F2 - F1;
u2 = inv(Q1)*R1;
u3 = u0 + u2;
F3 = F1 + dF;
R2 = F2 - F3; % unbalanced force must be equal to 0 in order to converge
Q2 = F3\u3;
u4 = inv(Q2)*R2;
u5 = u3 + u4;
F4 = F3 + dF;
R3 = F2 - F4;
Q3 = F4\u5;
u6 = inv(Q3)*R3;
u7 = u5 + u6;
F5 = F4 + dF;
R4 = F2 - F5;
Q4 = F5\u7;
u8 = inv(Q4)*R4;
u9 = u7 + u8;
F6 = F5 + dF;
R5 = F3 - F6;
4 Comments
John D'Errico
on 26 Nov 2021
Edited: John D'Errico
on 26 Nov 2021
Was it really nevessary to completely repost your question when all you had to do was fix an error in the first line of the code? Please don't keep reposting your question. I closed the last one.
Anyway, what assistance do you think you need? It seems like there is no iteration. You wrote a finite piece of code. It appears like it will run. What is iterative?
George Adomako Kumi
on 26 Nov 2021
Steven Lord
on 26 Nov 2021
Let's take a step back. You've posted a bunch of code but no explanation of the problem you're trying to solve. Start at the beginning and explain in words (no code) the problem you're trying to solve. Assume we don't know much about your field of study (because for at least some of us, that's probably a valid assumption.) Once we know that we'll have the context that may allow us to help you write / improve the code.
George Adomako Kumi
on 26 Nov 2021
Answers (0)
This question is closed.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!