1. What do you think this function is for? 2. Explain the inputs and outputs. 3. What would you write in the error state

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

1. What do you think this function is for? 2. Explain the inputs and outputs. 3. What would you write in the error state

Post by answerhappygod »

1 What Do You Think This Function Is For 2 Explain The Inputs And Outputs 3 What Would You Write In The Error State 1
1 What Do You Think This Function Is For 2 Explain The Inputs And Outputs 3 What Would You Write In The Error State 1 (362.65 KiB) Viewed 33 times
1. What do you think this function is for? 2. Explain the inputs and outputs. 3. What would you write in the error statement in line 13? 4. What is a way that a user can abuse this function and get an invalid result without triggering the error? Inspect the Matlab function below and answer the above questions IN YOUR OWN WORDS. function [x, i] myMatlabFunc(f, x0 ,x1) = i=0; while abs (x0-x1) >10^(-10) f(x1)*(x1-x0)/(f(x1)-f(x0)) xnext = x1 x0=x1; x1=xnext; i=i+1; if i==100 error ("???????") end end x = x1; end
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply