Re: formatting matrix in fortran90



On Dec 2, 8:22 pm, Schokoholic <mrt.marine...@xxxxxxxxx> wrote:
Hi everyone,

i need your help!!!

i am tring to formatting a matrix of dimensione 10xN+1

wha i am trying to do is following:

<value> <index>:<value>...... etc. for each row

the values in the first column do not need a "index".

how can i do that???

there is what i have done.. but it doesn't seem to work out properly:

                 DO 2 j_train=1,10

                        DO 1 i_train=2,n+1

                1       write(1,180) mat_data(j_train,1),i_train-1,mat_data
(j_train,i_train)

                2       write(1,*)

                180 FORMAT(1X,F20.1,I3,':',1X,F20.15,$)

is there anyone able to help me???

it's  important...

Does this help?

program test_csv
implicit none
integer :: mat_data(10, 5) = 1.0, n, i_train, j_train
n =4
DO j_train=1,10
write(1,180) mat_data(j_train,1),(i_train-1,mat_data
(j_train,i_train) ,i_train=2,n+1 )
write(1,*)
end do
180 FORMAT(1X,F20.15,5(I3,':',1X,F20.15))
end program


Regards,

Mike Metcalf
.



Relevant Pages

  • formatting matrix in fortran90
    ... i am tring to formatting a matrix of dimensione 10xN+1 ... wha i am trying to do is following: ... the values in the first column do not need a "index". ...
    (comp.lang.fortran)
  • Re: Table breaks unexpectedly across pages
    ... Check the formatting of the pargraph in the first column of the row that ... The row on this next page could easily fit on the previous ... > -number of cells after the break ...
    (microsoft.public.word.pagelayout)
  • Re: Excel 2007 Tables
    ... Some rows in the first column had Wrap Text applied to them (I used ALT+ ... I love to see your workbook to see what the problem is. ... the formatting for the cell in the first column does not get ...
    (microsoft.public.excel)
  • Re: Converting col number to alpha letter to use in a range...
    ... have data in them so I can apply formatting to them. ... Assuming the first column is "A" and the row is always ... how can I format the range statement? ... by searching backwards by Columns. ...
    (microsoft.public.excel.programming)
  • RE: Conditional Formatting in Excel
    ... the first column below is "D" the next is irelevant for this question, ... At some stage I would enter either a figure 0 or an actual currency ... Then Step two, Use conditional Formatting. ...
    (microsoft.public.excel.newusers)