hello guys I need help in this exercise

Perform a program that shows the next serie 1! / 2! , 2! / 3! , 3! / 4! , 4! / 5! , .....

6 commentaires

Steven Lord
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
Chroma Prime le 26 Oct 2018
Modifié(e) : Image Analyst le 26 Oct 2018
nro=input('ing nro')
resp=1
for i=1:1:nro
resp=resp*i
end
What can I increase to show the series of the question I asked :c
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
Chroma Prime le 26 Oct 2018
Exactly as I put it there, it is the form but I would like to know how I could put it in the programming language so that by putting numbers I can vote that sequence
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
Chroma Prime le 26 Oct 2018
when saying series I wanted to say a succession pattern

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Loops and Conditional Statements dans Centre d'aide et File Exchange

Produits

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by