Hello,
I have an array:
[A1; A2; A3; ...; A500]
I also have a newton-raphson loop:
while myrel > re && (steps < 20)
F = funcd_tlp(rtnewt, A, vd2, vd3,j); %evaluate temperature at 11600
f = F(1);
df = F(2);
xold = rtnewt;
rtnewt = rtnewt - f/df;
steps = steps + 1;
disp([rtnewt f])
myrel = abs((rtnewt-xold)/rtnewt);
end
I need the newton-raphson loop to evaluate each point A of the array.
How do I do this?
Thanks!

Respuestas (1)

dpb
dpb el 26 de Sept. de 2014

1 voto

One way == Encase the iterative section in another function; then invoke that function using arrayfun to apply to each element of A

Preguntada:

el 25 de Sept. de 2014

Respondida:

dpb
el 26 de Sept. de 2014

Community Treasure Hunt

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

Start Hunting!

Translated by