Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. Ahn210

    Fortran_Nested_Arrays?

    Hello, Can anyone teach me how to declare an allocatable array with another array (TYPE) nested inside? Or suggest better way to store data below? I wish to store data into an array like... Automaker (i) % Month (j) % SALES(j) Automaker (i) % Month (j) % COST(j) ex) Automaker (bmw) %...
  2. Ahn210

    Percentile on Fortran

    To mikrom Thanks for your reply; I always appreciate your posts! explanation on excel percentile was what I needed to apply that on fortran.
  3. Ahn210

    Percentile on Fortran

    Hello- Can someone teach me how to get percentile value given a sorted array data? Data 2.56 2.44 1.2 0.99 0.76 0.36 0.35 0.32 0.22 0.11 0.09 0.031 I wish to find 70th and 30th percentile value (0.921 // 0.25 got from excel)
  4. Ahn210

    reading missing values in array?

    Thank you for everyone who kindly provided suggestions. I applied salgerman's read in format method as it seems to be the easiest and it works!. Thank you!
  5. Ahn210

    reading missing values in array?

    Hello, Can someone help me reading arrays with missing values? Following is data that I got in text file: A B C D E F 85337 20120531 23.2457 20.08000 148210.48 -0.017605 85337 20120629 23.2457 21.95000...
  6. Ahn210

    Follow up Q on sorting. How to quick sort?

    Mikrom, I really learned a lot from you! thank you for pointing the nr_lines = 0 part as well.
  7. Ahn210

    Follow up Q on sorting. How to quick sort?

    oh.. I think I know why... after removing extra +1 on Allocate(array(nr_elements+1)) I don't have that issue. I wanted to be safe by allocating one extra array but maybe it doesn't work like that...
  8. Ahn210

    Follow up Q on sorting. How to quick sort?

    To Mikrom, I really appreciated your prev. posts. It helped me a lot and I almost figured out except for one minor error. When I run my code, it reads the input data file and sort. When I look at my output, along with sorted data, I see some weird number like... -84215041 -4.316+08...
  9. Ahn210

    Follow up Q on sorting. How to quick sort?

    To Mikrom Thanks for the reply! I wish to ask one more question on this. If I don't know the amount of data.. so I have to use either really big number for loop and dummy parameter OR use allocatable array, how should I set integer, parameter :: l = 4 ? I could find total number of data...
  10. Ahn210

    Follow up Q on sorting. How to quick sort?

    Hello, Thanks for answering my prev. question on simple sorting of 2 column data which were: ID nums 12 0.111 58 1.52 . . . . . . 101 0.5 10 2.89 I declared 2 single array ID(:) and nums(:) DO J = 1, 9 DO K = J+1, 10 IF(nums(J) > nums(K)) THEN temp = nums(K) temp2 = id(k)...
  11. Ahn210

    how to sort 2 columns together?

    Hello, I'm a newbie to fortran and need some help on sorting 2 columns of data (related) to be sorted on 1 column. For instance, if my input text file has following: ID nums 12 0.111 58 1.52 101 0.5 10 2.89 I declared 2 single array ID(:) and nums(:) and applied selection sort...

Part and Inventory Search

Back
Top