<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>'Urgent: problem with data selection' Thread RSS Feed</title>
    <link>http://www.programmersheaven.com/</link>
    <description>Contains the latest posts from the thread 'Urgent: problem with data selection' posted on the 'New programming languages' forum at Programmer's Heaven.</description>
    <language>en</language>
    <copyright>Copyright 2013 Programmers Heaven</copyright>
    <pubDate>Sun, 19 May 2013 04:43:47 -0700</pubDate>
    <lastBuildDate>Sun, 19 May 2013 04:43:47 -0700</lastBuildDate>
    <generator>Argotic Syndication Framework 2007.3.0.1, http://www.codeplex.com/Argotic</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <ttl>360</ttl>
    <image>
      <url>http://www.programmersheaven.com/images/ph.gif</url>
      <title>Programmers Heaven</title>
      <link>http://www.programmersheaven.com/</link>
      <width>88</width>
      <height>31</height>
    </image>
    <item>
      <title>Urgent: problem with data selection</title>
      <link>http://www.programmersheaven.com/mb/languages/418727/418727/urgent-problem-with-data-selection/</link>
      <description>Hi,&lt;br /&gt;
&lt;br /&gt;
I do have a problem to write a Fortran program to select data from a huge data set as follows:&lt;br /&gt;
&lt;br /&gt;
1.500D+00 1.000D+06 3.000D+06 5.000D+06 7.000D+06 9.000D+06 1.100D+07 1.300D+07&lt;br /&gt;
 1.500D+07 1.700D+07 1.900D+07 2.100D+07 2.300D+07 2.500D+07 2.700D+07 2.900D+07&lt;br /&gt;
 3.100D+07 3.300D+07 3.500D+07 3.700D+07 3.900D+07 4.100D+07 4.300D+07 4.500D+07&lt;br /&gt;
 4.700D+07 4.900D+07 5.100D+07 5.300D+07 5.500D+07 5.700D+07 5.900D+07 6.100D+07&lt;br /&gt;
 1.750D+08 1.770D+08 1.790D+08 1.810D+08&lt;br /&gt;
&lt;br /&gt;
2.000D+00 1.000D+06 3.000D+06 5.000D+06 7.000D+06 9.000D+06 1.100D+07 1.300D+07&lt;br /&gt;
 1.500D+07 1.700D+07 1.900D+07 2.100D+07 2.300D+07 2.500D+07 2.700D+07 2.900D+07&lt;br /&gt;
 3.100D+07 3.300D+07 3.500D+07 3.700D+07 3.900D+07 4.100D+07 4.300D+07 4.500D+07&lt;br /&gt;
 4.700D+07 4.900D+07 5.100D+07 5.300D+07 5.500D+07 5.700D+07 5.900D+07 6.100D+07&lt;br /&gt;
1.750D+08 1.770D+08 1.790D+08 1.810D+08&lt;br /&gt;
&lt;br /&gt;
2.500D+00 1.000D+06 3.000D+06 5.000D+06 7.000D+06 9.000D+06 1.100D+07 1.300D+07&lt;br /&gt;
 1.500D+07 1.700D+07 1.900D+07 2.100D+07 2.300D+07 2.500D+07 2.700D+07 2.900D+07&lt;br /&gt;
 3.100D+07 3.300D+07 3.500D+07 3.700D+07 3.900D+07 4.100D+07 4.300D+07 4.500D+07&lt;br /&gt;
 4.700D+07 4.900D+07 5.100D+07 5.300D+07 5.500D+07 5.700D+07 5.900D+07 6.100D+07&lt;br /&gt;
1.750D+08 1.770D+08 1.790D+08 1.810D+08&lt;br /&gt;
.....&lt;br /&gt;
....&lt;br /&gt;
....&lt;br /&gt;
&lt;br /&gt;
The data consists of blocks (without spaces), the number of blocks is not known, each block contains 36 numbers, my problem is to select certain numbers from each block say B1(1)B1(20),B1(33) and put all data from all blocks under each other as:&lt;br /&gt;
 B1(1) B1(20) B1(33)&lt;br /&gt;
 B2(1) B2(20) B2(33)&lt;br /&gt;
 B3(1) B3(20) B3(33)&lt;br /&gt;
 ..................&lt;br /&gt;
&lt;br /&gt;
Can anybody help please,&lt;br /&gt;
&lt;br /&gt;
Thanks in advance</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/languages/418727/418727/urgent-problem-with-data-selection/</guid>
      <pubDate>Thu, 16 Sep 2010 06:12:25 -0700</pubDate>
      <category>New programming languages</category>
    </item>
    <item>
      <title>Re: Urgent: problem with data selection</title>
      <link>http://www.programmersheaven.com/mb/languages/418727/418730/re-urgent-problem-with-data-selection/#418730</link>
      <description>Maybe this will help.  Don't be afraid of READ&lt;br /&gt;
and FORMAT statements.  You don't write about how&lt;br /&gt;
each block is laid out or my browser just makes&lt;br /&gt;
it look different.&lt;br /&gt;
&lt;pre class="sourcecode"&gt;C
      INTEGER*4 I,J,X
C
      DOUBLE B(36,100)
C
C     ASSIGN THE UNIT NUMBER OF THE FILE.  THERE SHOULD BE SOME KIND OF 
C       END OF FILE(EOF) THAT YOU CAN TEST FOR
C
      X = 10
C
C
      DO 10 J = 1 TO 100
         READ(UNIT=X,FMT=9000) (B(I,J),I=1,36,1)
 9000 FORMAT(36D10.3)
C            I MAY NOT HAVE THE FORMAT EXACTLY RIGHT
   10 CONTINUE 
C
C     THE OTHER DISPLAY PART I'LL LEAVE TO YOU
C&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/languages/418727/418730/re-urgent-problem-with-data-selection/#418730</guid>
      <pubDate>Thu, 16 Sep 2010 16:13:52 -0700</pubDate>
      <category>New programming languages</category>
    </item>
    <item>
      <title>Re: Urgent: problem with data selection</title>
      <link>http://www.programmersheaven.com/mb/languages/418727/418733/re-urgent-problem-with-data-selection/#418733</link>
      <description>Hi,&lt;br /&gt;
Thanks very much for the quick reply, I have adopted the program and it seems to work with small problem: The number of blocks is set to a large number (e.g., 1000) and thus if the number of blocks less than 1000, the output contains zeros for the rest (which is not required).&lt;br /&gt;
Is there any way to detect the number of blocks and also write it out.&lt;br /&gt;
&lt;br /&gt;
How can I eliminate the zeros?&lt;br /&gt;
&lt;br /&gt;
Here is the program and a sample output.&lt;br /&gt;
&lt;br /&gt;
  program recon&lt;br /&gt;
      INTEGER*4 I,J,X&lt;br /&gt;
      DOUBLE B(92,1000)&lt;br /&gt;
&lt;br /&gt;
C&lt;br /&gt;
       OPEN(UNIT=10, FILE='fourier.dat',STATUS='OLD')&lt;br /&gt;
       OPEN(UNIT=15, FILE='fourier.out',STATUS='replace')&lt;br /&gt;
C&lt;br /&gt;
      DO 10 J = 1, 1000&lt;br /&gt;
         READ(10,9000,end=15) (B(I,J),I=1,92,1)&lt;br /&gt;
 9000 FORMAT(1p,8d10.3)&lt;br /&gt;
&lt;br /&gt;
   10 CONTINUE&lt;br /&gt;
C&lt;br /&gt;
   15 CONTINUE&lt;br /&gt;
&lt;br /&gt;
      DO 20 J = 1, 1000&lt;br /&gt;
         write(15,9005) (B(I,J),I=1,92,30)&lt;br /&gt;
 9005 FORMAT(1p,4d10.3)&lt;br /&gt;
   20 CONTINUE&lt;br /&gt;
       end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----------------------&lt;br /&gt;
&lt;br /&gt;
Output&lt;br /&gt;
&lt;br /&gt;
 8.640D+00 5.900D+07 1.190D+08 1.790D+08&lt;br /&gt;
 8.760D+00 5.900D+07 1.190D+08 1.790D+08&lt;br /&gt;
 8.880D+00 0.000D+00 0.000D+00 0.000D+00&lt;br /&gt;
 0.000D+00 0.000D+00 0.000D+00 0.000D+00&lt;br /&gt;
 0.000D+00 0.000D+00 0.000D+00 0.000D+00&lt;br /&gt;
 0.000D+00 0.000D+00 0.000D+00 0.000D+00&lt;br /&gt;
 0.000D+00 0.000D+00 0.000D+00 0.000D+00&lt;br /&gt;
 0.000D+00 0.000D+00 0.000D+00 0.000D+00&lt;br /&gt;
 0.000D+00 0.000D+00 0.000D+00 0.000D+00  &lt;br /&gt;
&lt;br /&gt;
--------------&lt;br /&gt;
&lt;br /&gt;
Many thanks in advance,&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/languages/418727/418733/re-urgent-problem-with-data-selection/#418733</guid>
      <pubDate>Fri, 17 Sep 2010 02:34:56 -0700</pubDate>
      <category>New programming languages</category>
    </item>
    <item>
      <title>This post has been deleted.</title>
      <link>http://www.programmersheaven.com/mb/languages/418727/418734/this-post-has-been-deleted/#418734</link>
      <description>This post has been deleted.</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/languages/418727/418734/this-post-has-been-deleted/#418734</guid>
      <pubDate>Fri, 17 Sep 2010 02:35:05 -0700</pubDate>
      <category>New programming languages</category>
    </item>
    <item>
      <title>Re: Urgent: problem with data selection</title>
      <link>http://www.programmersheaven.com/mb/languages/418727/418743/re-urgent-problem-with-data-selection/#418743</link>
      <description>Okay, the &lt;strong&gt;END&lt;/strong&gt; part in the &lt;strong&gt;READ&lt;/strong&gt; statement should work&lt;br /&gt;
and stop the loop from going on.  When that happens, take the&lt;br /&gt;
value of &lt;em&gt;J&lt;/em&gt; and &lt;em&gt;subtract 1&lt;/em&gt; to have tthe number of blocks read in.  Then have the 2nd loop go from &lt;em&gt;1&lt;/em&gt; to &lt;em&gt;J-1&lt;/em&gt; using another index.&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/languages/418727/418743/re-urgent-problem-with-data-selection/#418743</guid>
      <pubDate>Fri, 17 Sep 2010 18:17:53 -0700</pubDate>
      <category>New programming languages</category>
    </item>
    <item>
      <title>Re: Urgent: problem with data selection</title>
      <link>http://www.programmersheaven.com/mb/languages/418727/418766/re-urgent-problem-with-data-selection/#418766</link>
      <description>: Okay, the &lt;strong&gt;END&lt;/strong&gt; part in the &lt;strong&gt;READ&lt;/strong&gt; statement should work&lt;br /&gt;
: and stop the loop from going on.  When that happens, take the&lt;br /&gt;
: value of &lt;em&gt;J&lt;/em&gt; and &lt;em&gt;subtract 1&lt;/em&gt; to have &lt;br /&gt;
: tthe number of blocks read in.  Then have the 2nd loop go from &lt;br /&gt;
: &lt;em&gt;1&lt;/em&gt; to &lt;em&gt;J-1&lt;/em&gt; using another index.&lt;br /&gt;
: &lt;br /&gt;
Thanks a lot for your help... It works now&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/languages/418727/418766/re-urgent-problem-with-data-selection/#418766</guid>
      <pubDate>Mon, 20 Sep 2010 04:11:02 -0700</pubDate>
      <category>New programming languages</category>
    </item>
  </channel>
</rss>