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!