Code Matlab for a function that depends in a real parameter
显示 更早的评论

How to write a code Matlab fir the function F_alpha ?
1 个评论
John D'Errico
2024-12-17
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
2024-12-17
0 个投票
Parameterize the function you pass into the integral function. See the "Parameterized Function" example on the integral documentation page for a concrete example.
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)
类别
在 帮助中心 和 File Exchange 中查找有关 Sparse Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!