source: Sophya/trunk/SophyaProg/Examples/arr1.icc@ 1567

Last change on this file since 1567 was 1337, checked in by ansari, 25 years ago

Creation de module d'exemples (code Sophya + exemple pour (s)piapp)

Reza 20/11/2000

File size: 690 bytes
Line 
1// Fichier arr1.icc
2// Exemple d'utilisation de tableaux
3// Appel: runcxx -f arr1.icc
4// Creation , remplissage d'une matrice
5 TMatrix<r_4> ma(7,9);
6 ma = RegularSequence(0.1, 0.05);
7 cout << "\n arr1.icc: ma = " << ma << endl;
8 float min, max;
9// Utilisation des sous-tableaux
10 ma(Range(2,4), Range(4,7)) = M_PI;
11 cout << "\n Apres ma(Range(2,4), Range(4,7)) = " << ma << endl;
12// Appel de methodes
13 ma.MinMax(min, max);
14 cout << " MinMax(ma) : min= " << min << " max= " << max << endl;
15 TMatrix<r_4> sma = Sin(ma);
16 cout << "\n test pour runcxx - sma = Sin(ma)= " << sma << endl;
17 sma.MinMax(min, max);
18 cout << " MinMax(sma) : min= " << min << " max= " << max << endl;
19
Note: See TracBrowser for help on using the repository browser.