Double sum of this formula

조회 수: 4 (최근 30일)
giometar
giometar 2019년 6월 21일
댓글: giometar 2019년 6월 24일
Hello
I need help about this formula:
_{E_n}=\sum_{k=1}^{n}\left ( _{d_k} \sum_{l=0}^{1-k}_{K_l}*{sin^{2l}{b_n_-_1}}\right )
Values of K0 and b0 are known
Thanks

채택된 답변

Shwetank Shrey
Shwetank Shrey 2019년 6월 21일
Just verify once if this is the formula that you needed. You would have to define K, b and n beforehand.
symsum((d(k).*symsum((K(l)*((sin(b(n-1))).^(2.*l))),l,0,(1-k))),k,1,n)
  댓글 수: 3
Shwetank Shrey
Shwetank Shrey 2019년 6월 24일
Adjusted according to matlab indexing (1 indexed instead of 0 indexed).
d = randi([0 9], 10, 1);
K = randi([0 9], 10, 1);
b = randi([0 9], 10, 1);
n = 3;
sum_k = 0;
for k = 2 : n+1
sum_l = 0;
for l = 1 : 3-k % this was if you had 1-k which i guess is a typo. anyway add 2 to whatever this would otherwise be.
sum_l = sum_l + (K(l) .* (sin(b(n)).^(2.*l)));
end
sum_k = sum_k + (d(k) .* sum_l);
end
disp(sum_k);
giometar
giometar 2019년 6월 24일
thank you very much
it shoud be k-1

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by