hello guys I need help in this exercise
Afficher commentaires plus anciens
Perform a program that shows the next serie 1! / 2! , 2! / 3! , 3! / 4! , 4! / 5! , .....
6 commentaires
Steven Lord
le 26 Oct 2018
Since this sounds like a homework assignment, if you show what you've tried so far and ask a specific question about where you're having difficulty we may be able to offer some guidance.
Chroma Prime
le 26 Oct 2018
Modifié(e) : Image Analyst
le 26 Oct 2018
Image Analyst
le 26 Oct 2018
Hint: No input() statement is needed.
So are you supposed to take a vector of numbers
v = [0.5, 0.333333333333333, 0.25, 0.2]
which is what
v=[factorial(1) / factorial(2) , factorial(2) / factorial(3) , factorial(3) / factorial(4) , factorial(4) / factorial(5) ]
is numerically, and without knowing that the numbers are constructed using that factorial ratio algorithm supposed to find "the next serie", which I assume you mean as "the next term in the series"? And it would be factorial(5)/factorial(6), which is 0.166666666666667. But as we know from the college testing controversies, there are lots of ways that you could make virtually any number be the next number in almost any series (ever heard of Lagrange interpolating polynomials?).
Chroma Prime
le 26 Oct 2018
Image Analyst
le 26 Oct 2018
Well I don't even know what "serie" (not an English word) or "....." means. Why not simply do
function result = MyFunction()
result = factorial(5)/factorial(6);
I doubt that is what is intended but it does return the next term in the limited number of terms in the series you gave.
Chroma Prime
le 26 Oct 2018
Réponses (0)
Catégories
En savoir plus sur Loops and Conditional Statements dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!