Code Matlab for a function that depends in a real parameter

조회 수: 28 (최근 30일)
Djamel
Djamel 대략 19시간 전
편집: Torsten 대략 15시간 전
How to write a code Matlab fir the function F_alpha ?
  댓글 수: 1
John D'Errico
John D'Errico 10분 전
Please stop asking the same question repeatedly. This is now the third time I have seen essentially this same question, and the second ime you have asked identically the same question.

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

답변 (2개)

Steven Lord
Steven Lord 9분 전
Parameterize the function you pass into the integral function. See the "Parameterized Function" example on the integral documentation page for a concrete example.

Torsten
Torsten 대략 2시간 전
편집: Torsten 대략 1시간 전
integrand = @(f,y)y.*sin(f(y));
F_alpha = @(f,alpha,x)alpha.*x.*integral(@(y)integrand(f,y),0,1);
f = @(u)u.^2;
alpha = 1;
x = 2;
F_alpha(f,alpha,x)
ans = 0.4597

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by