Skip to main content
1-Visitor
June 11, 2020
Question

Jacobi method - show all the partial solution of the sys. iteration by iteration

  • June 11, 2020
  • 2 replies
  • 6548 views

Jacobi method - show all the partial solution of the sys. iteration by iteration

 

Hello,

I want to out put all the partial solution of the sys. iteration by iteration in a table (or m x n matrix):

 

itr     x1    x2    x3    x4

0      ...    ...    ....    ....

1    ....    ....    ....    ....

- - - - - - - - - - - - - - - - -

itr    ....    ....    ....    ....

 

 

Also i don't know why in my file does not accept itr->0   instead accept begining from itr->1.  I attached the file.

 

 

2 replies

23-Emerald IV
June 11, 2020

You've set ORIGIN:=1, this means that indexing in arrays and matrices starts at 1, not 0.

 

Success!
Luc

25-Diamond I
June 11, 2020

@tubar wrote:

 

 

Also i don't know why in my file does not accept itr->0   instead accept begining from itr->1.  I attached the file.

 

 


Because you have set ORIGIN to be 1 at the top of your sheet and you use x[itr in your program. itr=0 would mean an invalid array index if ORIGIN=1 and thats exactly what the error messages says.

 

tubar1-VisitorAuthor
1-Visitor
June 11, 2020

That one related to the ORIGIN is the minor problem. I take it as it is. Instead, the biggest problem that I still not solved is related to the OUTPUT : iteration vs partial solution of the system. I cannot make the function/file to group all iteration solutions in a table or a matrix.  The file is attached in the previous messaje.

 

tubar_1-1591897050192.png

 

23-Emerald IV
June 11, 2020

It's not clear what you expect as OUTPUT. Please post a picture of what you would like the OUTPUT to be for the illustrated case.

 

Success!
Luc