How to define function include others functions in matlab
2 次查看(过去 30 天)
显示 更早的评论
Assume I have 2 complicated function X(u) and Y(v). How to define R(X,Y) function, then I can get integral of R(u,v)?
For example
X(u) = 1-u
Y(v) = 1-v
R(u,v) = sqrt(X^2+Y^2)
0 个评论
采纳的回答
Dyuman Joshi
2023-11-15
X = @(u) 1-u;
Y = @(v) 1-v;
R = @(u,v) sqrt(X(u).^2+Y(v).^2);
%Integrate R w.r.t u from 0 to 1
%and w.r.t v from 1 to 2
integral2(R, 0, 1, 1, 2)
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Mathematics and Optimization 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!