Write a MATLAB program to evaluate the function y(x) = ln (1/( 1 − x)) for any user-specified value of x, where x is a number < 1.0 (note that ln is the natural logarithm, the logarithm to the base e). Use an if structure to verify that the value passed to the program is legal. If the value of x is legal, calculate y(x). If not, write a suitable error message and quit.

Solved
Show answers

Ask an AI advisor a question