how can i calculate the series using the first 10 terms of the sequence

14 ビュー (過去 30 日間)
R.D
R.D 2020 年 4 月 8 日
コメント済み: Walter Roberson 2024 年 3 月 12 日
how can i calculate the series using the first 10 terms of the sequence
  3 件のコメント
Ameer Hamza
Ameer Hamza 2020 年 4 月 8 日
Which series?
R.D
R.D 2020 年 4 月 8 日
using the first 10 terms

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

回答 (2 件)

Ameer Hamza
Ameer Hamza 2020 年 4 月 8 日
編集済み: Ameer Hamza 2020 年 4 月 8 日
try this
term = 0; % initialize variable
% loop 10 times
for n = 0:9
% calculate term
term(n+2) = term(n+1) + (1 / factorial(n));
% display term
fprintf('Term %d = %f\n', n+1, term(n+2));
end
Output
Term 1 = 1.000000
Term 2 = 2.000000
Term 3 = 2.500000
Term 4 = 2.666667
Term 5 = 2.708333
Term 6 = 2.716667
Term 7 = 2.718056
Term 8 = 2.718254
Term 9 = 2.718279
Term 10 = 2.718282
  32 件のコメント
R.D
R.D 2020 年 4 月 10 日
Plot all the rain drops on the window when the time is 0 s (i.e. at the start of the journey) using a FOR loop. The plot should be contained exactly in the perimeter of the window and the rain drops should be represented as solid blue lines that connect the corresponding start and end nodes
ANY IDEA HOW TO SOLVE THIS ONE???
Ameer Hamza
Ameer Hamza 2020 年 4 月 10 日
Romario, please start a new question, since it is entirely different from your original question. Also, for such a homework question. It is a better idea to show us some code that you have tried and ask a specific question related to MATLAB.

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


Clara
Clara 2024 年 3 月 12 日
Let x0 be any integer. Suppose that the following rule is used to define a sequence of numbers based on x0.
xk+1 =0.5xk (if xk is even)
or xk+1=3xk+1 (if xk is odd)
Write a MATLAB script to generate the first 10 terms of the sequence.

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by