j**n 发帖数: 71 | 1 用MATLAB解一个较大的linear system, 有大概1000个未知数吧, 也就是要求一个size
1000x1000 的matrix的inverse.
觉得未知数的解不很不精确, 不过不觉得是matrix size大的原因, 而是因为未知数本
身的解的数值太大, 大约有10^16 到 10^17 那么大. 请问有什么方法可以知道未知数
的解是不是因为太大而不够精确? MATLAB最多能handle多大的解?
谢谢! | h***z 发帖数: 233 | 2 Your matrix is probably poorly conditioned. Use cond(matrix) to check the
condition number of your matrix.
size
【在 j**n 的大作中提到】 : 用MATLAB解一个较大的linear system, 有大概1000个未知数吧, 也就是要求一个size : 1000x1000 的matrix的inverse. : 觉得未知数的解不很不精确, 不过不觉得是matrix size大的原因, 而是因为未知数本 : 身的解的数值太大, 大约有10^16 到 10^17 那么大. 请问有什么方法可以知道未知数 : 的解是不是因为太大而不够精确? MATLAB最多能handle多大的解? : 谢谢!
| j**n 发帖数: 71 | 3 thanks for your reply, and what does it mean to say that a matrix is poorly
conditioned?
【在 h***z 的大作中提到】 : Your matrix is probably poorly conditioned. Use cond(matrix) to check the : condition number of your matrix. : : size
| l*****i 发帖数: 3929 | 4 That means your matrix will be hard to invert. Even if you can do it, it's g
onna be inaccurate.
poorly
【在 j**n 的大作中提到】 : thanks for your reply, and what does it mean to say that a matrix is poorly : conditioned?
| j**n 发帖数: 71 | 5 Thanks.
And I am using sparse matrix, so am using condest(X) instead, and it returns
values as large as 4.6328e+020, what does this number exactly tell me? I
mean, how large is too large for X to be inverted accurately?
g
【在 l*****i 的大作中提到】 : That means your matrix will be hard to invert. Even if you can do it, it's g : onna be inaccurate. : : poorly
| c*******h 发帖数: 1096 | 6 this condition number is definitely too large.
to solve your system, i suggest you look at a number of sparse solvers,
such as pcg, bicgstab, gmres etc, and see which one suits your matrix.
also, do try some pre-conditioners to lower down the condition number.
returns
【在 j**n 的大作中提到】 : Thanks. : And I am using sparse matrix, so am using condest(X) instead, and it returns : values as large as 4.6328e+020, what does this number exactly tell me? I : mean, how large is too large for X to be inverted accurately? : : g
| j**n 发帖数: 71 | 7 Can you give more details? what are the pre-conditioners for? how to use
them? any useful link you'd suggest that gives a good explanation of it?
thanks.
【在 c*******h 的大作中提到】 : this condition number is definitely too large. : to solve your system, i suggest you look at a number of sparse solvers, : such as pcg, bicgstab, gmres etc, and see which one suits your matrix. : also, do try some pre-conditioners to lower down the condition number. : : returns
| t***s 发帖数: 4666 | 8 are you sure your matrix is full rank and invertable?
and in any case, don't do inverse. solve the system directly.
returns
【在 j**n 的大作中提到】 : Thanks. : And I am using sparse matrix, so am using condest(X) instead, and it returns : values as large as 4.6328e+020, what does this number exactly tell me? I : mean, how large is too large for X to be inverted accurately? : : g
| c*******h 发帖数: 1096 | 9 what you are in front of is an entire area of sparse matrix computation.
unless you have taken a course on it, it is unlikely that you understand
the details from just a few words from me.
in short, what i was proposing to you are a few iterative algorithms to
solve your sparse linear system. you can use the `help' command in matlab
to read the instructions on how to use these algorithms, to get a feel
which algorithm is suitable for your matrix, and to get to know (and
try) more algorithms from
【在 j**n 的大作中提到】 : Can you give more details? what are the pre-conditioners for? how to use : them? any useful link you'd suggest that gives a good explanation of it? : thanks.
| j**n 发帖数: 71 | 10 Yes, I am sure the matrix of of full rank, and I was solving it direct by
X = SPARSE \ B
【在 t***s 的大作中提到】 : are you sure your matrix is full rank and invertable? : and in any case, don't do inverse. solve the system directly. : : returns
| | | p******h 发帖数: 1783 | 11 选择合理的物理单位重建矩阵,使未知数落在合理的区间
size
【在 j**n 的大作中提到】 : 用MATLAB解一个较大的linear system, 有大概1000个未知数吧, 也就是要求一个size : 1000x1000 的matrix的inverse. : 觉得未知数的解不很不精确, 不过不觉得是matrix size大的原因, 而是因为未知数本 : 身的解的数值太大, 大约有10^16 到 10^17 那么大. 请问有什么方法可以知道未知数 : 的解是不是因为太大而不够精确? MATLAB最多能handle多大的解? : 谢谢!
| h***z 发帖数: 233 | 12 A matrix M is poorly conditioned if a small change in vector v can lead to a
large change in inv(M)*v.
poorly
【在 j**n 的大作中提到】 : thanks for your reply, and what does it mean to say that a matrix is poorly : conditioned?
| t***s 发帖数: 4666 | 13 but a condition # in the order of 10^20 indicates it's not full rank,
especially in the numerical sense, considering your machine epsilon
is probably 2.22e-16.
【在 j**n 的大作中提到】 : Yes, I am sure the matrix of of full rank, and I was solving it direct by : X = SPARSE \ B
| h***z 发帖数: 233 | 14 With a condition number of 4.6328e+020, your matrix might still technically
be full rank, but for all practical purposes, it is essentially rank-
deficient. For example, consider the matrix
A = [ 1e-20 0; 0 1 ]
A is technically full rank with a condition number of 1e+20, but in
practice, it really is very similar to the rank deficient matrix [ 0 0;
0 1]. For example, consider the vectors
u = [ 0 , 1 ]' and v = [ 1e-10 , 1 ]'
u and v are very similar and should
【在 j**n 的大作中提到】 : Yes, I am sure the matrix of of full rank, and I was solving it direct by : X = SPARSE \ B
| m******2 发帖数: 4 | 15 As far as I knew, Matlab can't handle 1000 by 1000 problem: some are memory
issue some are "never think about it". You may knew that Matlab steals
Fortran Linpack with its own modifications. Go find the orginal Fortran code
for the high dimension problem, you may get better answers. | m******2 发帖数: 4 | 16 Or try SVD based algorithm. Matlab has subroutines for it. |
|