How to work with a matrix close to singular in MATLAB ?

조회 수: 10 (최근 30일)
HN
HN 2020년 10월 27일
편집: HN 2020년 10월 29일
I've ill-conditioned matrix which shows its inverse close to singular. So, the minimization solution is unstable. The psedoinverse gives abruptly different outcome from the inverse. Is there any method to handle this kind of issue in matlab?
Thanks

채택된 답변

John D'Errico
John D'Errico 2020년 10월 27일
Sorry, but no magic exists. This is why numerical linear algebra exists as an area of mathematics, and why courses are taught in the subject.
Does a soution exist? Possibly. This will typically either involve learning why your matrix becomes singular, Is this an issue of the problem you are solving? Poor data perhaps? A poorly formulated problem? Poorly written code? A poorly scaled problem? Just a nasty problem to solve? Are you trying to solve a big problem with insufficient information? Who knows? We are not omniscient, and our MATLAB crystal ball cannot see into your computer or your mind.
If it is one of the above issues, then you may be able to fix it by getting better data, by improving the algorithm, by rescaling the data, by getting more or better data. We cannot know.
Can you use a pseudo-inverse in some way to deal with it? Again, it is possible, but of course, we are given no clue as you your code, what algorithm is even involved, nothing.
If you are willing to show ALL of your code, explain what you are doing AND provide any data to run the code, we MAY be able to help.
You probably need to sit down with someone who has the expertise to undertand what you are doing. This may be your thesis advior, your boss, a colleague. Explain clearly what you are trying to do. Show them what you see as the problem.
But unless you are willing to provide considerably more information, I'm sorry, but working with a singular matrix is like dividing by zero.
  댓글 수: 1
HN
HN 2020년 10월 27일
편집: HN 2020년 10월 29일
Below is the program.
close all;
clearvars
t=0:ts:1;
for k=1:length(t)
th(k)=-0.2*cos(2*pi*t(k));
psi(k)=0.2*sin(2*pi*t(k));
end
end

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Mathematics에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by