02.05.2014 Views

Patrick Corde & Anne Fouilloux

Patrick Corde & Anne Fouilloux

Patrick Corde & Anne Fouilloux

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Corrigés 243<br />

30 ! Transformation de la matrice à l’aide<br />

31 ! de la méthode choisie.<br />

32<br />

33 select case( choix_methode )<br />

34 case (1)<br />

35 call transform( mat, n, m, identite )<br />

36 case (2)<br />

37 call transform( mat, n, m, carre )<br />

38 case (3)<br />

39 call transform( mat, n, m, sqrt )<br />

40 case (4)<br />

41 call transform( mat, n, m, logarithme )<br />

42 end select<br />

43<br />

44 ! Sauvegarde de la matrice transformée dans<br />

45 ! le fichier "exo6_matrice_transf".<br />

46<br />

47 open( unit=1, file="exo6_matrice_transf", &<br />

48 form="formatted", action="write", &<br />

49 status="replace", iostat=ios )<br />

50<br />

51 if ( ios /= 0 ) &<br />

52 stop "Erreur lors de l’’ouverture &<br />

53 &du fichier ""exo6_matrice_transf"""<br />

54<br />

55 do num_ligne=1,n<br />

56 write( unit=1, fmt=’(3f10.6)’ ) mat(num_ligne,:)<br />

57 end do<br />

58 close( unit=1 )<br />

59 end program mat_transf<br />

INSTITUT DU DÉVELOPPEMENT<br />

ET DES RESSOURCES<br />

EN INFORMATIQUE SCIENTIFIQUE<br />

Cours langage Fortran – 27 janvier 2006<br />

<strong>Patrick</strong> <strong>Corde</strong> et <strong>Anne</strong> <strong>Fouilloux</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!