Code Comments
Programming Forum and web based access to our favorite programming groups.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!!!
Post Follow-up to this messageIn 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
Post Follow-up to this messageSecondo 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) -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. -.-.-.-.-.-
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.