Ok i have 4 problems based off of this one topic. y(x)=ln(1/(1-x)), Evaluate the function for any user specified value of x. Use a while loop, so that the program repeats for each legal value of x entered. When an illegal value of x is entered, terminate the program, when x>=1.
I dont understand how to get it to repeat and then terminate. Heres a rough attempt, gives an error:
%Homework 6 Problem 4_18
x=input('Please input an x-value < 1:');
while x<1
y(x)=log(1/(1-x)); fprintf('When x is %g, y is %g',x,y(x)) x=input('Please input an x-value < 1');end if x>=1 fprint('Error-Program Terminated')
Best Answer