Trouble graphing this non-linear function

4 vues (au cours des 30 derniers jours)
Alex Chen
Alex Chen le 8 Mai 2022
Commenté : Alex Chen le 8 Mai 2022
I am lost on this question:
x= linspace (0,10,100)
y = (((factorial(x))^(1./x))/(x))
fplot (x,y)
xlim[0,100]
  3 commentaires
Sam Chak
Sam Chak le 8 Mai 2022
Modifié(e) : Sam Chak le 8 Mai 2022
I'm also wondering how to plot the discrete math factorials in MATLAB, for example , since x must be real non-negative integers. By default, fplot(f) can plot a function f over the x interval [-5 5].
Alex Chen
Alex Chen le 8 Mai 2022
Yeah I somehow got it to work just by:
x = 1:100;
y = ((factorial(x)).^(1./x))./x
plot (x,y)

Connectez-vous pour commenter.

Réponses (1)

VBBV
VBBV le 8 Mai 2022
Modifié(e) : VBBV le 8 Mai 2022
x = 1:100;
y = ((factorial(x)).^(1./x))./x; % use element wise division
fplot(y,[0 100]) % no space between function and parenthesis
xlim([0,100]) % use() for xlim
  3 commentaires
Sam Chak
Sam Chak le 8 Mai 2022
You make the FREE online Graphing Calculator -- Desmos, looks very user-friendly.
VBBV
VBBV le 8 Mai 2022

Connectez-vous pour commenter.

Catégories

En savoir plus sur Mathematics dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by