Question: can you help me solve this error? also, im struggling with trying to code a line that counts the number of steps it takes for

 can you help me solve this error? also, im struggling with
trying to code a line that counts the number of steps it
can you help me solve this error? also, im struggling with trying to code a line that counts the number of steps it takes for the code to find the zero location. this code is meant to represent the bisection method. thanks!

25 u 26 27 % iii - Bisection Method tic a = 117; b = 122; :28 leftval = result2(a); rightval = result2(b); 29 30 31 32 33 134 35 d 36 t- 37 E38 39 [1 40 41 1 if (leftval*rightval>0) disp('no zero in this range'); end C = zeros (100,1); midval = zeros(100,1); for i = 1:100 - - ir 42 - = 1 43 44 45 46 leftval = result2(a); rightval result2(b); c(i) = (b+a)/2; midval(i) = result2(c(i)); -- yo 47 de 48 na 49 50 id 51 if (leftval*midval(i)0) 35 disp('no zero in this range'); 36 end 37 38 c = zeros(100,1); 39 midval = zeros (100,1); 40 for i = 1:100 - 41 42 leftval = result2(a); 43 rightval = result2(b); ir 44 c(i) = (b+a)/2; Command Window 10 function result2 = = GRt_1(timepoint) yo result = GRt (timepoint); del mal result2 = GRt (timepoint) - 1; for end 1 The approximate timepoints where GRt(t)-1=0 are at t = 119.5, 189.5, and 306.5 Array indices must be positive integers or logical values. Error in BME 301 HW 2 (line 45) (5) midval(i) = result2(c(i)); you meth ant mis >> Command Window e the st

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!