MATLAB: Finding determinant of symbolic matrix

symbolic determinant

hello.I have a symbolic matrix that is mixture of variable and doubles.how can i make zero some of very little double component to simplify finding the determinant of matrix?my matrix is bellow.I want to use conditional statement like 'if' because the size of matrix change according to user request. in this matrix 'N' is variable.i mean that i want to make for example q(1,2) equal to zero because it is too small. thanks
qq =
[[ 44681.0, -4.7401e-75, 0, -1.3732e-10, 3.7346e7, -5.3112e-75, 0, -1.4322e-10, 2.9776e8, 1.5518e-107, 0, -3.3114e-10];
[ 8.1726e-76, 178722.0, 4.7438e-11, 0, 1.9511e-75, 7.4692e7, 8.7751e-11, 0, 1.5518e-107, 1.0422e9, 3.3114e-10, 0]
[ 0, 8.5512e-11, 89362.0, -6.5381e-75, 0, 8.7751e-11, 7.4692e7, -7.8042e-75, 0, 3.3114e-10, 4.4658e8, 6.2072e-107]
[ -4.0572e-11, 0, -1.3076e-75, 357455.0, -7.6161e-11, 0, -1.7343e-75, 1.4938e8, -3.3114e-10, 0, 6.2072e-107, 1.1911e9]
[ 7446.8, -1.0544e-61, 0, -9663.6, 1.1173e8, -7.0455e-76, 0, -2.6905e-11, 3.7346e7, 1.9511e-75, 0, -7.6161e-11]
[ 5.272e-62, 59575.0, 4831.8, 0, -7.0455e-76, 1.4894e8, 2.6905e-11, 0, -5.3112e-75, 7.4692e7, 8.7751e-11, 0]
[ 0, 2415.9, 7446.8, -1.687e-60, 0, 2.6905e-11, 4.0973e8, -2.8182e-75, 0, 8.7751e-11, 7.4692e7, -1.7343e-75]
[ -1208.0, 0, 8.4352e-61, 59575.0, -2.6905e-11, 0, -2.8182e-75, 4.4693e8, -1.4322e-10, 0, -7.8042e-75, 1.4938e8]
[ 18384.0 - 1.2337*N, -1.2481e-78, 0, 3.5556*N - 6.3151e-14, 7446.8, 5.272e-62, 0, -1208.0, 44681.0, 8.1726e-76, 0, -4.0572e-11]
[ -1.2481e-78, 110266.0 - 4.9348*N, 6.3151e-14 - 3.5556*N, 0, -1.0544e-61, 59575.0, 2415.9, 0, -4.7401e-75, 178722.0, 8.5512e-11, 0]
[ 0, 6.3151e-14 - 3.5556*N, 156266.0 - 1.2337*N, -4.9923e-78, 0, 4831.8, 7446.8, 8.4352e-61, 0, 4.7438e-11, 89362.0, -1.3076e-75]
[ 3.5556*N - 6.3151e-14, 0, -4.9923e-78, 294144.0 - 4.9348*N, -9663.6, 0, -1.687e-60, 59575.0, -1.3732e-10, 0, -6.5381e-75, 357455.0]]

Best Answer

After some amount of editing of your problem, this looks like what you have:
syms N
qq =[[ 44681.0, -4.7401e-75, 0, -1.3732e-10, 3.7346e7, -5.3112e-75, 0, -1.4322e-10, 2.9776e8, 1.5518e-107, 0, -3.3114e-10];...
[ 8.1726e-76, 178722.0, 4.7438e-11, 0, 1.9511e-75, 7.4692e7, 8.7751e-11, 0, 1.5518e-107, 1.0422e9, 3.3114e-10, 0];...
[ 0, 8.5512e-11, 89362.0, -6.5381e-75, 0, 8.7751e-11, 7.4692e7, -7.8042e-75, 0, 3.3114e-10, 4.4658e8, 6.2072e-107];...
[ -4.0572e-11, 0, -1.3076e-75, 357455.0, -7.6161e-11, 0, -1.7343e-75, 1.4938e8, -3.3114e-10, 0, 6.2072e-107, 1.1911e9];...
[ 7446.8, -1.0544e-61, 0, -9663.6, 1.1173e8, -7.0455e-76, 0, -2.6905e-11, 3.7346e7, 1.9511e-75, 0, -7.6161e-11];...
[ 5.272e-62, 59575.0, 4831.8, 0, -7.0455e-76, 1.4894e8, 2.6905e-11, 0, -5.3112e-75, 7.4692e7, 8.7751e-11, 0];...
[ 0, 2415.9, 7446.8, -1.687e-60, 0, 2.6905e-11, 4.0973e8, -2.8182e-75, 0, 8.7751e-11, 7.4692e7, -1.7343e-75];...
[ -1208.0, 0, 8.4352e-61, 59575.0, -2.6905e-11, 0, -2.8182e-75, 4.4693e8, -1.4322e-10, 0, -7.8042e-75, 1.4938e8];...
[ 18384.0 - 1.2337*N, -1.2481e-78, 0, 3.5556*N - 6.3151e-14, 7446.8, 5.272e-62, 0, -1208.0, 44681.0, 8.1726e-76, 0, -4.0572e-11];...
[ -1.2481e-78, 110266.0 - 4.9348*N, 6.3151e-14 - 3.5556*N, 0, -1.0544e-61, 59575.0, 2415.9, 0, -4.7401e-75, 178722.0, 8.5512e-11, 0];...
[ 0, 6.3151e-14 - 3.5556*N, 156266.0 - 1.2337*N, -4.9923e-78, 0, 4831.8, 7446.8, 8.4352e-61, 0, 4.7438e-11, 89362.0, -1.3076e-75];...
[ 3.5556*N - 6.3151e-14, 0, -4.9923e-78, 294144.0 - 4.9348*N, -9663.6, 0, -1.687e-60, 59575.0, -1.3732e-10, 0, -6.5381e-75, 357455.0]];
The above "works", but I fail to see the problem.
vpa(det(qq))
ans =
1.8538988389887758076595412425312e70*N^4 + 3.8481968863330834402308968596352e75*N^3 + 1.1350019885325862098472256092697e80*N^2 - 5.4852597316969590900114498078753e84*N + 4.0160391563059379558453942057817e88
The matrix is symbolic. Making some of those moderately small elements equal to zero will risk making a significant change in the determinant, since you have no idea what a reasonable cutoff on the smallness need be.
For example, you have elements like this:
3.5556*N - 6.3151e-14
Should the constant term be dropped? ARE YOU SURE? Depending on the value of N, it may well be quite significant, and to what goal would dropping that term achieve, since the problem is actually computable as it is. There is no gain in dropping those small terms, since the matrix is no more easily worked with if they are zero. The matrix is symbolic!