hello guys I need help in this exercise
Show older comments
Perform a program that shows the next serie 1! / 2! , 2! / 3! , 3! / 4! , 4! / 5! , .....
6 Comments
Steven Lord
on 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
on 26 Oct 2018
Edited: Image Analyst
on 26 Oct 2018
Image Analyst
on 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
on 26 Oct 2018
Image Analyst
on 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
on 26 Oct 2018
Answers (0)
Categories
Find more on Loops and Conditional Statements in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!