Antworten (1)

Deia Craig
Deia Craig am 26 Sep. 2019

0 Stimmen

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

Kategorien

Mehr zu Get Started with MATLAB finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 26 Sep. 2019

Beantwortet:

am 26 Sep. 2019

Community Treasure Hunt

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

Start Hunting!

Translated by