Using function with a for loop

조회 수: 3 (최근 30일)
Laidog
Laidog 2022년 8월 27일
댓글: Laidog 2022년 8월 27일
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.

채택된 답변

VBBV
VBBV 2022년 8월 27일
(factorial(i)).^2)
You have two extra parenthesis for this term
  댓글 수: 2
VBBV
VBBV 2022년 8월 27일
편집: VBBV 2022년 8월 27일
Additional parenthesis )) are not needed. And end is missing for function as well.
Laidog
Laidog 2022년 8월 27일
where should I put the end that I'm missing

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by