<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic dynamic multi-dimensional arrays in LabWindows/CVI</title>
    <link>https://ni.lithium.com/t5/LabWindows-CVI/dynamic-multi-dimensional-arrays/m-p/21656#M1908</link>
    <description>I am trying to read in a text file, store all the numbers in a dynamic multi-dimensional array and then write the numbers back to a binary file using fwrite.  The text files are quite large(roughly 100k to 400k), I am trying to parse these files and write them in binary format to save space(about 50%).  Multiple files will be combined into one binary file.  The files are created consecutively so data integrity is very important.  Is there such a thing as a dynamic multi-dimensional array?  Or is there a better way to store the large masses of data? &lt;BR /&gt;</description>
    <pubDate>Thu, 26 Apr 2001 19:31:12 GMT</pubDate>
    <dc:creator>Kevin C</dc:creator>
    <dc:date>2001-04-26T19:31:12Z</dc:date>
    <item>
      <title>dynamic multi-dimensional arrays</title>
      <link>https://ni.lithium.com/t5/LabWindows-CVI/dynamic-multi-dimensional-arrays/m-p/21656#M1908</link>
      <description>I am trying to read in a text file, store all the numbers in a dynamic multi-dimensional array and then write the numbers back to a binary file using fwrite.  The text files are quite large(roughly 100k to 400k), I am trying to parse these files and write them in binary format to save space(about 50%).  Multiple files will be combined into one binary file.  The files are created consecutively so data integrity is very important.  Is there such a thing as a dynamic multi-dimensional array?  Or is there a better way to store the large masses of data? &lt;BR /&gt;</description>
      <pubDate>Thu, 26 Apr 2001 19:31:12 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabWindows-CVI/dynamic-multi-dimensional-arrays/m-p/21656#M1908</guid>
      <dc:creator>Kevin C</dc:creator>
      <dc:date>2001-04-26T19:31:12Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic multi-dimensional arrays</title>
      <link>https://ni.lithium.com/t5/LabWindows-CVI/dynamic-multi-dimensional-arrays/m-p/21657#M1909</link>
      <description>It is possible to build dynamic-, multi-dimensional arrays. One way to obtain them is as follows:&lt;BR /&gt;&lt;BR /&gt;#include &lt;ANSI_C.H&gt;&lt;BR /&gt;static int  **a;&lt;BR /&gt;static int  i;&lt;BR /&gt;&lt;BR /&gt;// Prepare array of pointers to sub-arrays&lt;BR /&gt;a = malloc (10 * sizeof (int));&lt;BR /&gt;for (i = 0; i &amp;lt; 10; i++) {&lt;BR /&gt;  // Allocate inizialized memory for subarrays&lt;BR /&gt;  *(a + i) = calloc (10 +i, sizeof (int));&lt;BR /&gt;}&lt;BR /&gt;a[0][0] = 1;&lt;BR /&gt;a[1][1] = 2;&lt;BR /&gt;a[9][9] = 10;&lt;BR /&gt;&lt;BR /&gt;As you see in my example, this way you can even allocate a matrix with different-lenght rows. To you the task of managing this curious situation (if needed).&lt;BR /&gt;&lt;BR /&gt;In order to save memory occupation when reading data files, you could consider using floats instead of doubles (4 bytes per cell instead of 8): memory saving is evident, if your data nature allows using them.&lt;BR /&gt;&lt;BR /&gt;Hope this helps&lt;BR /&gt;&lt;BR /&gt;Roberto &lt;BR /&gt;&lt;/ANSI_C.H&gt;</description>
      <pubDate>Sun, 29 Apr 2001 20:32:53 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabWindows-CVI/dynamic-multi-dimensional-arrays/m-p/21657#M1909</guid>
      <dc:creator>RobertoBozzolo</dc:creator>
      <dc:date>2001-04-29T20:32:53Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic multi-dimensional arrays</title>
      <link>https://ni.lithium.com/t5/LabWindows-CVI/dynamic-multi-dimensional-arrays/m-p/21658#M1910</link>
      <description>Another possible way is described here:&lt;BR /&gt;http://zone.ni.com/devzone/devzoneweb.nsf/opendoc?openagent&amp;amp;8DE40999FF70BF208625683A000AE1CF&amp;amp;cat=40B44B36401CBACE06256874000FFBC5&lt;BR /&gt;Roberto &lt;BR /&gt;</description>
      <pubDate>Sun, 29 Apr 2001 21:01:08 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabWindows-CVI/dynamic-multi-dimensional-arrays/m-p/21658#M1910</guid>
      <dc:creator>RobertoBozzolo</dc:creator>
      <dc:date>2001-04-29T21:01:08Z</dc:date>
    </item>
  </channel>
</rss>

