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

1 次查看(过去 30 天)
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
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)

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Numerical Integration and Differentiation 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by