필터 지우기
필터 지우기

plese help my, The following code is a small example of what I want to do. I want the result of the integration and the solution of this problem

조회 수: 1 (최근 30일)
syms x; syms y;
k= 2*x+3*y;
f= 4*x+5*y;
m=@(x,y)k.*f;
z=integral2(m,0,2,1,4);
I know a simple solution to this small example, as follows
syms x; syms y;
k= 2*x+3*y;
f= 4*x+5*y;
m=@(x,y) (2*x+3*y).*(4*x+5*y) ;
z=integral2(m,0,2,1,4);
But in my code, the functions k and f are very very long and I want the matlab to do the multiplication and integration directly.
 

채택된 답변

darova
darova 2020년 4월 10일
Try matlabFunction
% m=@(x,y)k.*f;
m = matlabFunction(k*f);

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by