Using function with a for loop

2 views (last 30 days)
Laidog
Laidog on 27 Aug 2022
Commented: Laidog on 27 Aug 2022
I'm struggling to complete the function with a for loop.
Below is what I have got so far. Not sure what went wrong and how to fix it.
I also need a code to call the function at the end.

Accepted Answer

VBBV
VBBV on 27 Aug 2022
(factorial(i)).^2)
You have two extra parenthesis for this term
  2 Comments
VBBV
VBBV on 27 Aug 2022
Edited: VBBV on 27 Aug 2022
Additional parenthesis )) are not needed. And end is missing for function as well.
Laidog
Laidog on 27 Aug 2022
where should I put the end that I'm missing

Sign in to comment.

More 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!