For Programmers: Free Programming Magazines  


Home > Archive > Fortran > December 2004 > Italian









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Italian
Pippo

2004-12-19, 3:57 pm

There is some one who speak ITALIAN?
I need to know how can i read from a file with some matrix, every single
elements of these matrix, this is for an examination.
Vorrei sapere come si fa a leggere da un file che contiene delle matrici (in
forma di record fatti da numeri) ogni singolo numero, per poi metterli in
delle classi di frequenza(quanti cen ne sono tra 0 e 20, tra20 e 40, ecc.).
Qualcuno può aiutarmi? Mi serve per un esame!!!


Danguard

2004-12-20, 3:56 am

In article <4aexd.310238$b5.15057837@news3.tin.it>, nula@email.it
says...

> There is some one who speak ITALIAN?


Me :)

> I need to know how can i read from a file with some matrix, every single
> elements of these matrix, this is for an examination.


I think the past thread

"Reading an array from a text file into fortran"

in this newsgroup could be helpful.

Ciao,
Dan
Garcia

2004-12-25, 8:56 am

Secondo me dovresti procedere così:
open(1,file='nomefile.dat',status='old')
read (1,*) T(x) ---> dipende dalla dimensione dei tuoi record.
close (1)
do i=1,x
temp = T(i)
if ((temp.gt.0).and.(temp.lt.20)) then
j=1
freq20(j) = temp
j = j+1
else if ((temp.gt.20).and.(temp.lt.40))
k=1
freq40(k) = temp
k= k+1
......
......
endif


una cosa del genere.

--
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-.-.-.-.-.-
Borgo delle Tradizioni
Visita il sito www.oliodelborgo.altervista.org
"non si vive solo di pane, si vive pure di soddisfazioni"
(nonno giacobbe)
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-.-.-.-.-.-


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com