y(x) =ln (1/(1-x))

Answers (1)

Deia Craig
Deia Craig on 26 Sep 2019

0 votes

clc
clear
x = input('To calculate y(x) enter a value for x: ');
if x < 1
y = log(1/(1-x));
fprintf('\nThe value of y(x) for x = %.2f is: %.2f\n\n',x,y)
else
fprintf('\nThe value of x must be less than 1!\n\n')
end

Categories

Find more on Get Started with MATLAB in Help Center and File Exchange

Asked:

on 26 Sep 2019

Answered:

on 26 Sep 2019

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!