Matlab freezes when using a piecewise function integration
이전 댓글 표시
Hello , I need to integrate a function with unknown argument x,y,z. My code is this:
fx = piecewise(-1.5<x<-0.5, x^2/2+3*x/2+9/8, -0.5<x<0.5, -x^2+3/4, 0.5<x<1.5, x^2/2 -3*x/2+9/8);
fy = piecewise(-1.5<y<-0.5, y^2/2+3*y/2+9/8, -0.5<y<0.5, -y^2+3/4, 0.5<y<1.5, y^2/2 -3*y/2+9/8);
fz = piecewise(-1.5<z<-0.5, z^2/2+3*z/2+9/8, -0.5<z<0.5, -z^2+3/4, 0.5<z<1.5, z^2/2 -3*z/2+9/8);
res = fx*fy*fz;
int(res,x,-1.5,1.5);
but it freezes matlab. How can I integrate this function? Thank you.
답변 (1개)
Steven Lord
2018년 7월 9일
0 개 추천
I'm guessing you're encountering the problem described in this Answer. If so, update your MATLAB installation as described in the Answer.
카테고리
도움말 센터 및 File Exchange에서 Assumptions에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!