Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I am trying to figure out why my code wont work, please help! if keeps saying th

ID: 3529050 • Letter: I

Question

I am trying to figure out why my code wont work, please help! if keeps saying that xold is not defined function[Xr]=bisection1(Xl,Xu) % Problem 5.20 % Finding the Maximum Deflection E=50000; I=30000; wo=2.5; L=600; dy= @(x)((wo)/(120*E*I*L))*(-5*x^4+6*L^2*x^2-L^4); y= @(x)((wo)/(120*E*I*L))*(-x^5+2*L^2*x^3-L^4*x); Xr=(Xl+Xu)/2; test=dy(Xl)*dy(Xr); Xr=xold; %I hardly ever use the while loop but in this case it was surely needed % So I had to learn it, the while loop starts with a true statement about % the function then it interates until the it reaches the break statement while abs((Xr-xold)/(Xr))>.001 if test< 0 Xu=Xr; elseif test > 0 Xl=Xr; else break end end end

Explanation / Answer

Problem is not clear.


I can help u with the while loop

while - end_whilerepresents a loop that evaluates its body while a specified condition holds true.

For Example

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote