필터 지우기
필터 지우기

integration using two variables

조회 수: 2 (최근 30일)
Ramneet Sidhu
Ramneet Sidhu 2019년 10월 25일
답변: Walter Roberson 2019년 10월 25일
I have two expressions for variables a and x
M = (-150 + 20.556*x - ((1/2)*(x-10)^2 - (1/60)*(x-10)^3))*heaviside(20-x) + (5.556*x+(250/3))*heaviside(x-20);
m = (a*(1-x/30))*heaviside(20-a) + (x*(1-a/30)*heaviside(20-x) + a*(1-x/30)*heaviside(x-20))*heaviside(a-20);
And another expression
Mm = M*m;
I want to integrate Mm with respect to x treating a as a constant from x = 0 to x = 30. How can i do it?

답변 (1개)

Walter Roberson
Walter Roberson 2019년 10월 25일
Use the symbolic toolbox
syms x a
M = (-150 + 20.556*x - ((1/2)*(x-10)^2 - (1/60)*(x-10)^3))*heaviside(20-x) + (5.556*x+(250/3))*heaviside(x-20);
m = (a*(1-x/30))*heaviside(20-a) + (x*(1-a/30)*heaviside(20-x) + a*(1-x/30)*heaviside(x-20))*heaviside(a-20);
Mm = M*m;
result = simplify( int(expand(Mm), x, 0, 30) );

카테고리

Help CenterFile Exchange에서 Formula Manipulation and Simplification에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by