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

7 views (last 30 days)
Bruno Teramoto
Bruno Teramoto on 26 Sep 2019
Answered: Deia Craig on 26 Sep 2019
mat.png

Answers (1)

Deia Craig
Deia Craig on 26 Sep 2019
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 Simulink in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!