summation using syms and rounding
이전 댓글 표시
is this way correct?Also want the number rounded to the first dp.
syms k
f = k-4/k-5;
v1 = subs(f, k, 1:3)
s_sum = sum(v1)
v2=subs(f,k,6:100)
s_sum2=sum(v2)
f=(0-4)/(0-5)
sum=s_sum+s_sum2+f
value = round(sum * 10) / 10
댓글 수: 6
Walter Roberson
2019년 3월 18일
No, that is a product symbol, not a summation symbol.
Also, k-4/k-5 is parsed as (k-(4/k))-5
Walter Roberson
2019년 3월 19일
(k-4)/(k-5)
dulanga
2019년 3월 19일
Torsten
2019년 3월 19일
Because you have to multiply P1 and P2, not add them.
dulanga
2019년 3월 19일
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Assumptions에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!