Matlab freezes when using a piecewise function integration
Mostra commenti meno recenti
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.
Risposte (1)
Steven Lord
il 9 Lug 2018
0 voti
I'm guessing you're encountering the problem described in this Answer. If so, update your MATLAB installation as described in the Answer.
1 Commento
MS C
il 10 Lug 2018
Categorie
Scopri di più su Assumptions in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!