채택된 답변

Brendan Jozwiak
Brendan Jozwiak 2022년 7월 11일
편집: Torsten 2022년 7월 11일

0 개 추천

syms x y z
%3a
expr_A = x*exp(-y);
expr_A_y = int(expr_A,y,0,log(x));
expr_A_yx = int(expr_A_y,x,0,2*z);
expr_A_yxz = int(expr_A_yx,z,1,2);
integral_a = vpa(expr_A_yxz);
% display results
disp('"Part A"')
"Part A"
fprintf('The result of integral is: %f\n\n',integral_a);
The result of integral is: 1.666667
%3b
expr_B = z/(y+1);
expr_B_x = int(expr_B,x,0,sqrt(1-z^2));
expr_B_xz = int(expr_B_x,z,0,1);
expr_B_xzy = int(expr_B_xz,y,0,1);
integral_b = vpa(expr_B_xzy);
% display results
disp('"Part B"')
"Part B"
fprintf('The result of integral is: %f\n\n',integral_b);
The result of integral is: 0.231049

추가 답변 (1개)

Ruchika P Barman
Ruchika P Barman 2022년 7월 11일

0 개 추천

It is my understanding that you are trying to write a MATLAB code to solve the problem that you have attached with your question. Please consider going through MATLAB Fundamentals or MATLAB On Ramp course in order to solve this with the help of MATLAB.
You may refer to this documentation on Numerical integration - MATLAB integral - MathWorks India to understand the functions and syntax that you can use.

카테고리

도움말 센터File Exchange에서 Programming에 대해 자세히 알아보기

질문:

2022년 7월 11일

편집:

2022년 7월 11일

Community Treasure Hunt

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

Start Hunting!

Translated by