Using function with a for loop

10 vues (au cours des 30 derniers jours)
Laidog
Laidog le 27 Août 2022
Commenté : Laidog le 27 Août 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.

Réponse acceptée

VBBV
VBBV le 27 Août 2022
(factorial(i)).^2)
You have two extra parenthesis for this term
  2 commentaires
VBBV
VBBV le 27 Août 2022
Modifié(e) : VBBV le 27 Août 2022
Additional parenthesis )) are not needed. And end is missing for function as well.
Laidog
Laidog le 27 Août 2022
where should I put the end that I'm missing

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Loops and Conditional Statements dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by