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 Wanet Telecoms Ltd 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: *

  • Users: Alfio75
  • Order by date
  1. Alfio75

    About ordering data

    That's a nice code Kevin... This is working. The next step is to get it counting for n times it is getting the same X Y Z colums. example 1 2 3 4 5 6 1 2 3 8 9 10 5 4 3 I wanna get this: 1 2 3 1 2 3 4 5 6 5 4 3 8 9 10 and: 1 2 3 is 2 times found 4 5 6 is 1 time 5 4 3 is 1 time 8 9 10 is 1...
  2. Alfio75

    About ordering data

    i got all those data in a file, so i think i could read those and order them.
  3. Alfio75

    About ordering data

    Hello guys. Does anybody know how to order ascendent a list of data? What i mean is that i got 3 columns of data. What i need is to order them with respect to the first one, but i need all the 2 next colums get order at the same time that one. Example 1 5 4 4 8 9 10 15 4 1 5 8 2 7 9 so...
  4. Alfio75

    distance between 2 points

    no rharsh , what i need is to add for example the 1.dat to an existent 1.dat , the 2.dat to another old 2.dat etc.
  5. Alfio75

    I'm trying to get numbers.

    That's a good point KevinADC.! In fact is just important the secuence and not the start of count.
  6. Alfio75

    I'm trying to get numbers.

    #!/usr/bin/perl -w use strict; my $number = 1; open FH, ">$number.dat" or die "Failed to open file [$number.dat]"; while(<DATA>) { if(/^(?:OCHO)?\s*$/) { close FH; $number++; open FH, ">$number.dat" or die "Failed to open file [$number.dat]"; next; } print FH "<"...
  7. Alfio75

    distance between 2 points

    ...= 2; my @points = map {[split]} <DATA>; dist_between_points(0..$#points); #{[(split)[1..3,0]]} #****************************************************** sub dist_between_points { my $point = shift; if (@_) { foreach (@_) {...
  8. Alfio75

    I'm trying to get numbers.

    Thanks guys but what i'm needing is to rename 600 files whose names r 1.dat, 2.dat...10.dat, 11.dat...600.dat To 001.dat, 002.dat,003.dat...010.dat etc that's because when i use another program i need to get named on that way. So any advice
  9. Alfio75

    Hello..how could i extract this ones?

    another question trojan. I have another post in here about distance between 2 points. Do u think using ur code can be easy to do that calculation?. I gonna give it a try but i need ur opinion.
  10. Alfio75

    distance between 2 points

    thanks rharsh let me try something and tomorrow U'll get one question more
  11. Alfio75

    Hello..how could i extract this ones?

    Yeah, trojan u r the man. but how about if i got more than 2 labels?
  12. Alfio75

    Hello..how could i extract this ones?

    Hello there trojan. You did it the next code and that is working but i got a new question. ********************* #!/usr/bin/perl -w use strict; my $number = 1; open FH, ">$number.dat" or die "Failed to open file [$number.dat]"; while(<DATA>) { if(/^(?:OCHO)?\s*$/) { close FH...
  13. Alfio75

    distance between 2 points

    I think i can assing radius if i can split the rows and if the field number one is 1 then i got a red point.I got the idea but i'm a newbie in perl
  14. Alfio75

    distance between 2 points

    Hello again. What i really want to get is comparations between all the points, same way ur last code did it. but i need to print the kind of colors for example, just to know if i'm comparing red with red and red with green. That's because when i print those to a file i want to identify them...
  15. Alfio75

    distance between 2 points

    Hello rharsh. ok ur code is working...now i got another question. In the last code u can know distances for 1 data set of 8 rows right? What should i do to be able to do the same for more than 1 data block ? Example: 1 0.266E+01 0.229E+01 0.384E+01 2 0.383E+01 0.301E+01 0.264E+01 1...
  16. Alfio75

    I'm trying to get numbers.

    ...another program that need that secuence to read files better. Any advice? That's just in the print statement. How i need to modify next file? ***************************************** open (INFILE, $infile); my $number = 1; open FH, ">$output_directory/$number.dat" or die "No puedo...
  17. Alfio75

    distance between 2 points

    ...blocks of 3 rows or more, and i need to print that information of each block to a file example first block to 1.dat second block to 2.dat, etc ******************************** #!/usr/bin/perl -w #use strict; my @points = map {[split]} <DATA>; my $min_dist = 10...
  18. Alfio75

    distance between 2 points

    ...fortran i did 2 nested cycles and i put a conditional to do that. that is a kind of: for 10 i=1,nrows for 20 j=1, nrows-1 distance(i,j)= square(x**2+y**2+z**2) if (distance(i,j).LE.VALUE) then print (*,30) value 20 continue 30 format(f10.3) 10 continue I meant, it's necesary to compare...
  19. Alfio75

    distance between 2 points

    ...to read this 2 point ( row number one and row number 2) and calculate the distance between them using the next expression: d=square root( (x2-x1)**2 +(y2-y1)**2 +(z2-z1)**2 ) Think about a lot of rows and a lot of comparations for example: point1 ----------point2------point3 i need to...
  20. Alfio75

    just a touch

    Hello. I answered a part of my confusion. I got another question to u. I'm trying to print double quotes . So how can I print to my file this kind of phrase? #include "background.inc" i tried print FH "#include" qq("background.inc"\n) I meant i want to print double quotes . Thanks in...

Part and Inventory Search

Back
Top