필터 지우기
필터 지우기

Can Somebody help me to write this equation in Matlab to get the value of Lambda?

조회 수: 3 (최근 30일)
Somebody help me to write the given expression in Matlab to get the value of lambda. Thank you in advance. I have attached the jpg file along with it. |``` is a incomplete gamma function. Your response and help will be highly appreciated.

채택된 답변

Chris C
Chris C 2014년 3월 12일
편집: Chris C 2014년 3월 12일
In order to calculate the left hand side (LHS) you'll want to determine when the nth term is small enough to neglect. The following code employs a user defined tolerance to specify when to terminate the summation (while loop). Not knowing what m, gamma and lambda are I just put in a random tolerance. You'll have to decide upon that yourself. With this code you will be able to subtract the right hand side (RHS) from the LHS and then optimize around lambda using fminsearch (or the like).
LHS = 0;
nth_Term = 0;
Tol = 0.001;
k = 0;
while nth_Term > Tol
nth_Term = (lambda*gamma/2)^k/(factorial(k)*(m+k)^0.5);
LHS = LHS + nth_Term;
k = k+1;
end
I just noticed you put in values for gamma and m, because of the size of gamma lambda had better be a fraction or this function will blow up. That knowledge will help to refine your optimization function.
  댓글 수: 2
Ashish Rauniyar
Ashish Rauniyar 2014년 3월 12일
Dear Chris,
Thank you for the prompt reply. Much appreciated.
Chris C
Chris C 2014년 3월 12일
Not a problem. Don't forget to "accept" comments that give a satisfactory solution to your question. That will help with the unanswered queue.

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

추가 답변 (1개)

Rizwana
Rizwana 2014년 3월 12일
편집: Rizwana 2014년 3월 12일
function [ans] = test(m,lamda)
r = factorial(m-1);
p = -lamda;
ans = exp(p)/r;
end
If you are interested in learning then start browsing mathworks help section
  댓글 수: 1
Ashish Rauniyar
Ashish Rauniyar 2014년 3월 12일
편집: Ashish Rauniyar 2014년 3월 12일
Hello Rizwana,
Thank you for the reply. The Right hand side part is ok i can solve. Can you help me to write the left hand side part in Matlab so that i can get a value of lambda?
Regards,
Ashish Rauniyar

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

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by