sum of series of following equation

조회 수: 3 (최근 30일)
Arvind Sharma
Arvind Sharma 2020년 10월 14일
댓글: Ameer Hamza 2020년 10월 14일
lamda=0.3:0.01:1.4; % unit micro-meter
Ec2=(1.24./lamda);
alpho=2e4;
alpha= real(alpho.*(sqrt(Ec2-1.51)));
d=1e-4;
JPh2=exp(-1.*alpha.*d); % equation 1
lamda1=0.82;
% now the summation of eqaution 1 goes from 0 to lamda1,
so how to calculate this sum of series

채택된 답변

Ameer Hamza
Ameer Hamza 2020년 10월 14일
You can use logical indexing to isolate the required values and then use sum()
lamda=0.3:0.01:1.4; % unit micro-meter
Ec2=(1.24./lamda);
alpho=2e4;
alpha= real(alpho.*(sqrt(Ec2-1.51)));
d=1e-4;
JPh2=exp(-1.*alpha.*d); % equation 1
lamda1=0.82;
idx = lamda < lamda1;
out_value = sum(JPh2(idx));
  댓글 수: 2
Arvind Sharma
Arvind Sharma 2020년 10월 14일
any other way to calculate
Ameer Hamza
Ameer Hamza 2020년 10월 14일
What is wrong with this method?

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

추가 답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by