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 Comments

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.
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?).
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.
when saying series I wanted to say a succession pattern

Sign in to comment.

Answers (0)

Categories

Find more on Loops and Conditional Statements in Help Center and File Exchange

Products

Tags

Asked:

on 26 Oct 2018

Commented:

on 26 Oct 2018

Community Treasure Hunt

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

Start Hunting!