Trouble graphing this non-linear function

1 回表示 (過去 30 日間)
Alex Chen
Alex Chen 2022 年 5 月 8 日
コメント済み: Alex Chen 2022 年 5 月 8 日
I am lost on this question:
x= linspace (0,10,100)
y = (((factorial(x))^(1./x))/(x))
fplot (x,y)
xlim[0,100]
  3 件のコメント
Sam Chak
Sam Chak 2022 年 5 月 8 日
編集済み: Sam Chak 2022 年 5 月 8 日
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 2022 年 5 月 8 日
Yeah I somehow got it to work just by:
x = 1:100;
y = ((factorial(x)).^(1./x))./x
plot (x,y)

サインインしてコメントする。

回答 (1 件)

VBBV
VBBV 2022 年 5 月 8 日
編集済み: VBBV 2022 年 5 月 8 日
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 件のコメント
Sam Chak
Sam Chak 2022 年 5 月 8 日
You make the FREE online Graphing Calculator -- Desmos, looks very user-friendly.
VBBV
VBBV 2022 年 5 月 8 日

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeDirected Graphs についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by