Iterative Method

x = pi/2; %we suppose the initial value pi/2
for k = 1:15 %for loop is used and start from one and iterates for 15 times
x(k+1)= (1/2)*(cos(x)+3); %value of x is initialized with the given function
disp(x) %to display the iterations
end

Print Friendly

Share this with your friends

One Comment to “Iterative Method”

  1. The exisptree shines through. Thanks for taking the time to answer.

Leave a Reply

Your email address will not be published. Required fields are marked *