Summation with looping
이전 댓글 표시
Find ∑((x^)n/n!) for x=1.8 and n=0 to 16.
Okay, my first attempt to do this looked like:
x = 1.8 For(0:16) xs = sum((x^n)/factorial(n)) end
xs
But I received the error: ??? Error: File: imageanalystbs.m Line: 11 Column: 6 Unexpected MATLAB expression.
My line 11 is the one with "For (0:16)"
What am I doing wrong here? Any help is appreciated.
채택된 답변
추가 답변 (1개)
Image Analyst
2011년 12월 6일
2 개 추천
I think the problem is in your filename:
"imageanalystbs.m"
That sounds like a horrible name to me.
ImageAnalyst
댓글 수: 2
Daniel
2011년 12월 6일
Salah Saad
2015년 5월 5일
편집: Salah Saad
2015년 5월 5일
he's being sarcastic...ish, it still is a weird filename
카테고리
도움말 센터 및 File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!