You are not logged in.
So you see .3333 is not 1 / 3. When you did a calculation with it the error was magnified until it has a difference of 30.
I understand..And how can I explain why my result is Nan??
Offline
Because with that condition number you would need to have
.333333333333333333333333333333333333333333333333333333333333333333333\
3333333333333333333333333333333333333333333333333333333333333333333333\
3333333333333333333333333333333333333333333333333333333333333333333333\
3333333333333333333333333333333333333333333333333333333333333333333333\
3333333333333333333333333333333333333333333333333333333333333333333333\
333333333333333333333333333333333333333333333333333
for 1 / 3 and you only have .3333 or maybe .3333333333333333
The NAN might mean for all intents and purposes Matlab thinks that matrix is singular.
In math there is singular and non singular. In computation there is a third state, nearly singular. The Hilbert Matrix is one of those.
In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.
Offline
Is it like division by 0???Or not???
Offline
Probably came down to dividing by some very small number which Matlab interpreted as 0. That is only one possibility.
In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.
Offline
Could you explain what a nearly singular matrix is??
Offline
One with a very high condition number or one with the determinant being nearly 0.
You are not using Matlab well enough, read up on these suggestions:
The Symbolic Toolbox and its vpa (variable precision arithmetic) commands if you want to accurately work with a large Hilbert Matrix.
There is also the bicgstab command.
If you can not get any of these to work then give me the column vector b and I will solve the system using the tools I have.
In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.
Offline
One with a very high condition number or one with the determinant being nearly 0.
You are not using Matlab well enough, read up on these suggestions:
The Symbolic Toolbox and its vpa (variable precision arithmetic) commands if you want to accurately work with a large Hilbert Matrix.
There is also the bicgstab command.
If you can not get any of these to work then give me the column vector b and I will solve the system using the tools I have.
Now,I wanted to calculate the determinant and the result is: det(H)=0..
So,you mean,that I should write it for example like that: vpa(hilb(n))? Or with an other way?? :/
Offline
I do not program in Matlab so you will have to consult the help.
Just what I said Matlab is interpreting a nearly singular matrix for a singular matrix.
Unless you can access the higher precision routines that Matlab has ( and they are pretty skimpy ) a big Hilbert will be out.
In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.
Offline
I do not program in Matlab so you will have to consult the help.
Just what I said Matlab is interpreting a nearly singular matrix for a singular matrix.
Unless you can access the higher precision routines that Matlab has ( and they are pretty skimpy ) a big Hilbert will be out.
I haven't found yet such a routine of Matlab..
And something else...Why when I find the error ||x_{k}-D|| of the last iteration of the methods,for n>=250,at the Jacobi method I get the result Nan and at the Gauss-Seidel method I get a real number???
(D is the exact result of the linear system)
Offline
Neither method will return a reliable answer.
If you can not get any of these to work then give me the column vector b and I will solve the system using the tools I have.
In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.
Offline
Why??Because of the fact that the Hilbert Matrix is very ill-conditioned??
Offline
Yes, it would require you to work to 400 digits of precision to get an answer that had 20 correct digits. If you can not work to that many digits the answers obtained will be meaningless.
If you supply the b, I can do the calculations for you.
In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.
Offline
Yes, it would require you to work to 400 digits of precision to get an answer that had 20 correct digits. If you can not work to that many digits the answers obtained will be meaningless.
If you supply the b, I can do the calculations for you.
Offline
Hi evinda;
You do not have the b vector to copy and paste? I am not seeing how to use that sum?!
In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.
Offline
Hi evinda;
You do not have the b vector to copy and paste? I am not seeing how to use that sum?!
You want to know how I wrote it in my code??
Offline
Yes, let me see how you did it.
I have to go offline now for a bit, see you then.
In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.
Offline