필터 지우기
필터 지우기

How can I integrate the math equation (attachment) numerically?

조회 수: 1 (최근 30일)
Md Jahid Hasan Sagor
Md Jahid Hasan Sagor 2023년 6월 15일
댓글: Walter Roberson 2023년 6월 16일
Pls see the attachment. There three different functions NL, NR and T which depend on Ex. Here, we have to integrate all with respect to Ex. I have made NL(Ex), NR(Ex) and T(Ex). But I cann't inegrate it altogether. How can I do that? (ingration of Ex*(NL(Ex)-NR(Ex))*T(Ex))

답변 (1개)

Torsten
Torsten 2023년 6월 15일
편집: Torsten 2023년 6월 15일
Just as it's written:
result = integral(@(Ex)Ex.*(NL(Ex)-NR(Ex)).*T(Ex),0,Inf)
Of course, I don't know whether you defined the three functions NL, NR and T correctly and if they can cope with array inputs for Ex.
  댓글 수: 2
Md Jahid Hasan Sagor
Md Jahid Hasan Sagor 2023년 6월 16일
Actually I have done it using quadgk. similar to you. But still it is not solved.
Error Message:
Operator '-' is not supported for operands of type 'function_handle'.
Error in electron_tunnel>@(Ex)Ex.*(NL-NR).*T (line 15)
result = integral(@(Ex)Ex.*(NL-NR).*T,0,Inf)
Walter Roberson
Walter Roberson 2023년 6월 16일
result = integral(@(Ex)Ex.*(NL(Ex) - NR(Ex)).*Tr(Ex), 0, Inf)

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

카테고리

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