Question: please can you do a function script that uses while loop WITHOUT USING BREAK AT THE END TO END THE CODE ON MATLAB. problem 3.13

 please can you do a function script that uses while loop

please can you do a function script that uses while loop WITHOUT USING BREAK AT THE END TO END THE CODE ON MATLAB.

problem 3.13

Alt PROGRAMMING WITH MATLAB 94 3.13 The "divide and average" method, an old-time method a for approximating the square root of any positive number a. can be formulated as b Write a well-structured M-file function based on the shile... break loop structure to implement this algorithm. Use proper indentation so that the structure is clear. At each step estimate the error in your approximation as Repeat the loop until e is less than or equal to a specified value. Design your program so that it returns both the re- sult and the eror. Make sure that it can evaluate the square root of numbers that are equal to and less than zero. For the latter case, display the result as an imaginary number. For example, the square root of -4 would return 2i. Test your program by evaluati 3.14 Piecewise functions are sometimes useful when the re- lationship between a dependent and an independent variable cannot be adequately represented by a single equation. For example, the velocity of a rocket might be described h ng a = 0.2, 10 and-4 for -1x 10-4

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!