how to solve multiple iteration for multiple input?
Mostra commenti meno recenti
I want to solve this equation ∆ε=∆σ/E+2(∆σ/2k)^n for ∆σ using iteration. I have ε ranging from (0 to 2).
- ∆ε is elongation
- ∆σ is stress
- E is modulus of elasticity
- K and n are constant
x = 16; %x is ∆σ
x_old = 100;
iter = 0;
k=38.177;
n=7.22;
E=15.25;
% y=linspace(0,5,0.5);
for i=[0:.01:0.5]
while abs(x_old-x) > 10^-3 && x ~= 0
x_old = x;
x = x - (2*(x/(2*k))^(n) + (x/(E))-i)/(2*n*(x/(2*k))^(n-1) + (1/(E)));
iter = iter + 1;
fprintf('Iteration %d: x=%.20f\n', iter, x);
pause;
end
end
I have script for Newton-Raphson Method for finding out ∆σ, but i don't know know how solve for multiple values. what i mean by multiple value is i have different ∆ε, ranging from 0 to 2. once i solved the iteration, i want to plot it as well. I think i could figure out ploting, but it would be helpful, if you could guide me on this. thank you very much!
sincerely siva
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Numerical Integration and Differential Equations in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!