Selecting values from a vector
1 view (last 30 days)
Show older comments
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!
0 Comments
Answers (1)
dpb
on 26 Sep 2014
One way == Encase the iterative section in another function; then invoke that function using arrayfun to apply to each element of A
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!