How to doI plot F(x) = [1 -(10/x)]/[1-(100/x^2)] for X ranging from 100 to 1100 at an interval of 50?

1 vue (au cours des 30 derniers jours)
Arpan Sow
Arpan Sow le 10 Mai 2021
Modifié(e) : Jan le 10 Mai 2021
F(x)= [1- (10/x)]/[1-(100/x^2)]

Réponses (2)

Jan
Jan le 10 Mai 2021
Modifié(e) : Jan le 10 Mai 2021
x = 100:50:1100;
plot(x, (1 - (10 ./ x)) ./ (1 - (100 ./ x.^2)));
With some basic maths skills, a simplification is easy:
plot(x, 1 ./ (1 + (10 ./ x))
% Or better:
plot(x, x ./ (x + 10))

Stephan
Stephan le 10 Mai 2021
F = @(x) (1-(10./x))./(1-(100./x.^2));
x_vals = 100:50:1100;
plot (x_vals, F(x_vals))

Catégories

En savoir plus sur Line Plots dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by