Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>You could actually use <a href="https://www.mathworks.com/help/matlab/ref/xlsread.html" rel="nofollow noreferrer"><code>xlsread</code></a> to accomplish this. After first placing your sample data above in a file <code>'input_file.csv'</code>, here is an example for how you can get the numeric values, text values, and the raw data in the file from the three outputs from <a href="https://www.mathworks.com/help/matlab/ref/xlsread.html" rel="nofollow noreferrer"><code>xlsread</code></a>:</p> <pre><code>&gt;&gt; [numData,textData,rawData] = xlsread('input_file.csv') numData = % An array of the numeric values from the file 51.9358 4.1833 51.9354 4.1841 51.9352 4.1846 51.9343 4.1864 51.9343 4.1864 51.9341 4.1869 textData = % A cell array of strings for the text values from the file 'ABC' 'ABC' 'ABC' 'ABC' 'ABC' 'ABC' rawData = % All the data from the file (numeric and text) in a cell array 'ABC' [51.9358] [4.1833] 'ABC' [51.9354] [4.1841] 'ABC' [51.9352] [4.1846] 'ABC' [51.9343] [4.1864] 'ABC' [51.9343] [4.1864] 'ABC' [51.9341] [4.1869] </code></pre> <p>You can then perform whatever processing you need to on the numeric data, then resave a subset of the rows of data to a new file using <a href="https://www.mathworks.com/help/matlab/ref/xlswrite.html" rel="nofollow noreferrer"><code>xlswrite</code></a>. Here's an example:</p> <pre><code>index = sqrt(sum(numData.^2,2)) &gt;= 50; % Find the rows where the point is % at a distance of 50 or greater % from the origin xlswrite('output_file.csv',rawData(index,:)); % Write those rows to a new file </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload