Getting error by inverting a matrix

Hello,
I changed a little bit the parameters of my matrix J, but now I dont get the inverse of J.
Error message:
Error using mupadmex
Error in MuPAD command: Error: Exponent overflow. [poly]
Evaluating: rnormal
Error in sym/privUnaryOp (line 1700)
Csym = mupadmex(op,args{1}.s,varargin{:});
Error in sym/inv (line 1128)
X = privUnaryOp(A, 'symobj::inv');
Error in detofJac (line 10)
Ji=inv(J);
Could it be, that my matrix J now with the paramter changes is singular or is too complicated?
Thank you very much for you help.

7 Comments

What is matrix ‘J’, how do you create it, and what do you intend to do with its inverse, ‘Ji’?
it doesnt matter what I intent to do with its invers, I just need it.
And J is a 2x2 matrix: With disp(J); the command window gives me the following: (I just selected and copied from the command window) If I change the parameters in this matrix back to normal , matlab gives me the inverse matrix....
[ (843937847447871284485259215221*atan((7591295679393379*y1)/281474976710656 - 6029284073134799/4503599627370496))/20282409603651670423947251286016 - (843937847447871284485259215221*atan((7591295679393379*y1)/281474976710656 + 63269/100000))/20282409603651670423947251286016 - (2008016153376818114561722882034279487857531019*y1^(2039279169394285/70368744177664))/11150372599265311570767859136324180752990208 - (843937847447871284485259215221*y1*(7591295679393379/(281474976710656*(((7591295679393379*y1)/281474976710656 + 63269/100000)^2 + 1)) - 7591295679393379/(281474976710656*(((7591295679393379*y1)/281474976710656 - 6029284073134799/4503599627370496)^2 + 1))))/20282409603651670423947251286016 - (18521919337695825475900947825254439*y1^(21237/1250))/3094850098213450687247810560000, 0] [ 0, (15798256513974917917454560974767*atan((6339*y2)/250 - 13423/12500))/324518553658426726783156020576256 - (15798256513974917917454560974767*atan((6339*y2)/250 + 2842928789975017/4503599627370496))/324518553658426726783156020576256 - (14746468850402715516729304781749667*y2^(5894254897307163/562949953421312))/158456325028528675187087900672000 - (171587469704128069312579344587508042432114690929*y2^(8162746177111353/281474976710656))/91343852333181432387730302044767688728495783936 - (15798256513974917917454560974767*y2*(6339/(250*(((6339*y2)/250 + 2842928789975017/4503599627370496)^2 + 1)) - 6339/(250*(((6339*y2)/250 - 13423/12500)^2 + 1))))/324518553658426726783156020576256]
Ahh I think I know why matlab shows an error: ERROR:
Error using mupadmex
Error in MuPAD command: Error: Exponent overflow. [poly]
In my function f I have some expressions with an exponent x^30 and I think therefore matlab says exponent overflow....
Yea... having something to the 2039279169394285/70368744177664 power is not good for computing.
Star Strider
Star Strider on 18 Jul 2012
Edited: Star Strider on 18 Jul 2012
Actually it sort of does matter what you want to do with it, because MATLAB has the ability to do a direct matrix divide with ‘/’ and ‘\’, avoiding the need to invert it. That's the reason I asked.
If j is just two-by-two, why not compute the determinant by hand to see if it equals zero.
If your matrix is
A = [a,b;c,d],
then
det(A) = a*d-b*c
If det(A) ~= 0, the inverse is equal to
Ainv = [d,-b;-c,a] / det(A);
From the symbolic matrix posted earlier, when I tried to calculate its determinant, I got the same error that calculating the inverse generated, probably for the same reason.
I earlier suggested direct left-matrix-divide (\) and right-matrix-divide (/) to avoid the need to explicitly calculate the inverse, but that seems to have gone nowhere.

Sign in to comment.

Answers (0)

Asked:

on 18 Jul 2012

Community Treasure Hunt

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

Start Hunting!