<?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 Re: Import data from TXT - case study in Mathcad</title>
    <link>https://www.ptcusercommunity.com/t5/Mathcad/Import-data-from-TXT-case-study/m-p/668103#M190396</link>
    <description>&lt;P&gt;Thank you for your help&lt;/P&gt;</description>
    <pubDate>Tue, 26 May 2020 21:08:36 GMT</pubDate>
    <dc:creator>PawelDabrowski</dc:creator>
    <dc:date>2020-05-26T21:08:36Z</dc:date>
    <item>
      <title>Import data from TXT - case study</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Import-data-from-TXT-case-study/m-p/667817#M190364</link>
      <description>&lt;P&gt;Good afternoon,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a multi-column txt file. I want to perform an operation on two fields. Each of them has the following layout: number/number (eg. 4/5 or 4/5). I need to extract the first character from both of them and then add (eg 4/5 and 4/6 ==&amp;gt; 4 + 5 = 9) The problem is that MathCAD 15 reads the field as mathematical operation and gives me 1.0 or some fraction. How could I import it as a text, pick two characters, convert to INT and then get the result?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The second issue with the data is that some parameters are given only every 4th row, not each of them (eg. needed PDOP). I need to perform a simple statistic analysis (mean, stdev, min, max, med). As the columns with data (eg. PDOP) have empty rows I cannot do it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would be very grateful for your help. Perhaps&amp;nbsp;&lt;a href="https://www.ptcusercommunity.com/t5/user/viewprofilepage/user-id/77841"&gt;@WernerE&lt;/a&gt;&amp;nbsp;or&amp;nbsp;@Werner_E&amp;nbsp; would have some advice for me. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please find attached MathCAD worksheet and a sample of my datafile.&lt;/P&gt;</description>
      <pubDate>Mon, 25 May 2020 15:18:46 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Import-data-from-TXT-case-study/m-p/667817#M190364</guid>
      <dc:creator>PawelDabrowski</dc:creator>
      <dc:date>2020-05-25T15:18:46Z</dc:date>
    </item>
    <item>
      <title>Re: Import data from TXT - case study</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Import-data-from-TXT-case-study/m-p/667825#M190368</link>
      <description>&lt;P&gt;The second part of your question is easy enough:&lt;/P&gt;
&lt;P&gt;(though since all the values are the same it's not clear why you want to perform any stats on them!).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="g0.jpg" style="width: 598px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/27369iB0D5C0DE34787DE9/image-size/large?v=v2&amp;amp;px=999" role="button" title="g0.jpg" alt="g0.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Alan&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 May 2020 16:12:11 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Import-data-from-TXT-case-study/m-p/667825#M190368</guid>
      <dc:creator>AlanStevens</dc:creator>
      <dc:date>2020-05-25T16:12:11Z</dc:date>
    </item>
    <item>
      <title>Re: Import data from TXT - case study</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Import-data-from-TXT-case-study/m-p/667837#M190374</link>
      <description>&lt;P&gt;Thank you Alan,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is just a sample, my data is ~200,000 rows long &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 25 May 2020 17:35:09 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Import-data-from-TXT-case-study/m-p/667837#M190374</guid>
      <dc:creator>PawelDabrowski</dc:creator>
      <dc:date>2020-05-25T17:35:09Z</dc:date>
    </item>
    <item>
      <title>Re: Import data from TXT - case study</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Import-data-from-TXT-case-study/m-p/667838#M190375</link>
      <description>&lt;P&gt;The first part is also not too bad. Essentially it means to read the file as a ";" delimited file and replace entries containing "/" with the result of calculation where "/" is replaced with "+".&lt;/P&gt;
&lt;P&gt;See attached.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Success!&lt;BR /&gt;Luc&lt;/P&gt;</description>
      <pubDate>Mon, 25 May 2020 17:38:29 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Import-data-from-TXT-case-study/m-p/667838#M190375</guid>
      <dc:creator>LucMeekes</dc:creator>
      <dc:date>2020-05-25T17:38:29Z</dc:date>
    </item>
    <item>
      <title>Re: Import data from TXT - case study</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Import-data-from-TXT-case-study/m-p/667839#M190376</link>
      <description>&lt;P&gt;Here is an alternative solution to your second problem. The "on error" statement is necessary only in case that PDOP contains not a single entry with "-" as match would throw an error in that case.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Werner_E_0-1590427846780.png" style="width: 400px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/27373iA1B3DCC6809D77A0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Werner_E_0-1590427846780.png" alt="Werner_E_0-1590427846780.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Your first problem is more difficult. I could only think of two ways which both are not single liners&lt;BR /&gt;1) preprocess the input file by a self written filter program or maybe even a batch file to replace every "/" character by something else, probably a semicolon would be best if you are sure that every line of data really contains an expression in the form "a/b"&lt;/P&gt;
&lt;P&gt;2) Read the csv file into Mathcad byte by byte (using READBIN e.g.) and write a parser in Mathcad to extract the data in the way you need. Seems to be the more complex but maybe also the more flexible way.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 May 2020 18:00:05 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Import-data-from-TXT-case-study/m-p/667839#M190376</guid>
      <dc:creator>Werner_E</dc:creator>
      <dc:date>2020-05-25T18:00:05Z</dc:date>
    </item>
    <item>
      <title>Re: Import data from TXT - case study</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Import-data-from-TXT-case-study/m-p/667845#M190378</link>
      <description>&lt;P&gt;Thank you &lt;a href="https://www.ptcusercommunity.com/t5/user/viewprofilepage/user-id/66934"&gt;@Werner_E&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 May 2020 18:11:17 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Import-data-from-TXT-case-study/m-p/667845#M190378</guid>
      <dc:creator>PawelDabrowski</dc:creator>
      <dc:date>2020-05-25T18:11:17Z</dc:date>
    </item>
    <item>
      <title>Re: Import data from TXT - case study</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Import-data-from-TXT-case-study/m-p/667848#M190379</link>
      <description>&lt;P&gt;In the message the OP wrote "I need to extract the first character from both of them and then add" but the example he gave did differently! In the file once again he wrote&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Werner_E_0-1590430466855.png" style="width: 400px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/27375i407F88F321E1CC77/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Werner_E_0-1590430466855.png" alt="Werner_E_0-1590430466855.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;So maybe he is looking for something along the lines of&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Werner_E_0-1590430670284.png" style="width: 507px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/27377iF687A38431A538F3/image-dimensions/507x646?v=v2" width="507" height="646" role="button" title="Werner_E_0-1590430670284.png" alt="Werner_E_0-1590430670284.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 May 2020 18:18:05 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Import-data-from-TXT-case-study/m-p/667848#M190379</guid>
      <dc:creator>Werner_E</dc:creator>
      <dc:date>2020-05-25T18:18:05Z</dc:date>
    </item>
    <item>
      <title>Re: Import data from TXT - case study</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Import-data-from-TXT-case-study/m-p/667850#M190380</link>
      <description>&lt;P&gt;Pfff.... you did it just in the second? I am impressed. I did a mistake in the description.&amp;nbsp;&lt;a href="https://www.ptcusercommunity.com/t5/user/viewprofilepage/user-id/66934"&gt;@Werner_E&lt;/a&gt; was right.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I pasted the modifed file in my directory but unfortunately the worksheet doesn't provide results. What is wrong?&lt;/P&gt;</description>
      <pubDate>Mon, 25 May 2020 18:42:13 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Import-data-from-TXT-case-study/m-p/667850#M190380</guid>
      <dc:creator>PawelDabrowski</dc:creator>
      <dc:date>2020-05-25T18:42:13Z</dc:date>
    </item>
    <item>
      <title>Re: Import data from TXT - case study</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Import-data-from-TXT-case-study/m-p/667851#M190381</link>
      <description>&lt;P&gt;You may have to press the F9 function key.&lt;/P&gt;
&lt;P&gt;Automatic calculation is switched off.&lt;/P&gt;
&lt;P&gt;Edit:&lt;/P&gt;
&lt;P&gt;I've modified the file per your correction, and switched automatic calculation on.&lt;/P&gt;
&lt;P&gt;This should do it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Success!&lt;BR /&gt;Luc&lt;/P&gt;</description>
      <pubDate>Mon, 25 May 2020 19:06:01 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Import-data-from-TXT-case-study/m-p/667851#M190381</guid>
      <dc:creator>LucMeekes</dc:creator>
      <dc:date>2020-05-25T19:06:01Z</dc:date>
    </item>
    <item>
      <title>Re: Import data from TXT - case study</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Import-data-from-TXT-case-study/m-p/667862#M190383</link>
      <description>&lt;P&gt;Thank you, it works now. One final minor correction needed is to skip the first two lines in file. I tried to change the range to ORIGIN+2 but I was unsuccessful. With this, all would work perfectly.&lt;/P&gt;</description>
      <pubDate>Mon, 25 May 2020 19:57:27 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Import-data-from-TXT-case-study/m-p/667862#M190383</guid>
      <dc:creator>PawelDabrowski</dc:creator>
      <dc:date>2020-05-25T19:57:27Z</dc:date>
    </item>
    <item>
      <title>Re: Import data from TXT - case study</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Import-data-from-TXT-case-study/m-p/667866#M190384</link>
      <description>&lt;P&gt;Yes, that doesn't work. Try using the submatrix function on the result.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Success!&lt;/P&gt;
&lt;P&gt;Luc&lt;/P&gt;</description>
      <pubDate>Mon, 25 May 2020 22:15:19 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Import-data-from-TXT-case-study/m-p/667866#M190384</guid>
      <dc:creator>LucMeekes</dc:creator>
      <dc:date>2020-05-25T22:15:19Z</dc:date>
    </item>
    <item>
      <title>Re: Import data from TXT - case study</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Import-data-from-TXT-case-study/m-p/667877#M190387</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;I tried to change the range to ORIGIN+2 but I was unsuccessful.&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;It would work if you additionally replace every R[i by R[i-2.&lt;/P&gt;
&lt;P&gt;But I think using "submatrix" either on the result or on the input vectors col20 and col21 is a cleaner solution.&lt;BR /&gt;You could simply replace the last R by&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Werner_E_3-1590461601118.png" style="width: 400px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/27388i9BDE7139304F529C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Werner_E_3-1590461601118.png" alt="Werner_E_3-1590461601118.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 May 2020 02:53:54 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Import-data-from-TXT-case-study/m-p/667877#M190387</guid>
      <dc:creator>Werner_E</dc:creator>
      <dc:date>2020-05-26T02:53:54Z</dc:date>
    </item>
    <item>
      <title>Re: Import data from TXT - case study</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Import-data-from-TXT-case-study/m-p/668047#M190393</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Pre-process the file.&lt;/P&gt;
&lt;P&gt;remove first line sep=; with a text editor.&amp;nbsp; I use Edit Pad Classic.&amp;nbsp; it is free and handles large files easily.&lt;/P&gt;
&lt;P&gt;headers are now on top row.&lt;/P&gt;
&lt;P&gt;Pre-process the file again&lt;/P&gt;
&lt;P&gt;Open in excel in the resulting wizard screens use delimited and use "semicolon" and "/" as special delimiter.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 261px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/27416i19B34C7FD30EDECD/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture2.JPG" style="width: 212px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/27417iDC028E16D1DF5C5F/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture2.JPG" alt="Capture2.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture3.JPG" style="width: 251px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/27418i45FFB47FA963CC7D/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture3.JPG" alt="Capture3.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Now save this excel file as comma separated text file.&lt;/P&gt;
&lt;P&gt;This pre-processing takes little time.&lt;/P&gt;
&lt;P&gt;Now open in Mathcad using READCSV&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;On opening the 4/6 etc are seperated into 4 and 6 as seperate columns.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;Easy&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;Cheers&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;Terry&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 May 2020 14:04:50 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Import-data-from-TXT-case-study/m-p/668047#M190393</guid>
      <dc:creator>terryhendicott</dc:creator>
      <dc:date>2020-05-26T14:04:50Z</dc:date>
    </item>
    <item>
      <title>Re: Import data from TXT - case study</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Import-data-from-TXT-case-study/m-p/668056#M190395</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Doing the pre-processing I also note the first line of actual data has one extra blank column?&lt;/P&gt;
&lt;P&gt;This extra had to be taken out manually.&lt;/P&gt;
&lt;P&gt;Cheers Terry&lt;/P&gt;</description>
      <pubDate>Tue, 26 May 2020 14:40:05 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Import-data-from-TXT-case-study/m-p/668056#M190395</guid>
      <dc:creator>terryhendicott</dc:creator>
      <dc:date>2020-05-26T14:40:05Z</dc:date>
    </item>
    <item>
      <title>Re: Import data from TXT - case study</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Import-data-from-TXT-case-study/m-p/668103#M190396</link>
      <description>&lt;P&gt;Thank you for your help&lt;/P&gt;</description>
      <pubDate>Tue, 26 May 2020 21:08:36 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Import-data-from-TXT-case-study/m-p/668103#M190396</guid>
      <dc:creator>PawelDabrowski</dc:creator>
      <dc:date>2020-05-26T21:08:36Z</dc:date>
    </item>
    <item>
      <title>Re: Import data from TXT - case study</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Import-data-from-TXT-case-study/m-p/668104#M190397</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://www.ptcusercommunity.com/t5/user/viewprofilepage/user-id/66934"&gt;@Werner_E&lt;/a&gt;&amp;nbsp;, as always your help is priceless&lt;/P&gt;</description>
      <pubDate>Tue, 26 May 2020 21:09:26 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Import-data-from-TXT-case-study/m-p/668104#M190397</guid>
      <dc:creator>PawelDabrowski</dc:creator>
      <dc:date>2020-05-26T21:09:26Z</dc:date>
    </item>
  </channel>
</rss>

