getting only numbers from an 88x3 cell array.
Show older comments
I have imported my data from a text file which is attached below.I have successfully imported the data into matlab but now i want to extract specific data labeled under the Calculated Reaction time so far and now the Raw reaction time. The number of calculated reaction time readings can change depending on the subject who was taking the test. I am trying to have the code check for numbers in all three columns of each row and if the response is missing or not recorded to discard that reading and keep going on with checking if it the remainder rows are all numerical. I also want it to truncate when it hits the '''''''' before the Raw reaction times. My code, so far, is as follows:
% feed the data file here with the reaction times.
[filename] = uigetfile('*', 'Select the data file')
% This function imports the reaction data from the file
import_data = importdata(filename)
[data] = import_data.data
fid = fopen(filename,'r')
scan_init_cell = textscan(fid, '%s %s %s', 'headerlines',18, 'CollectOutput', 1)
%scan_init = cell2mat(scan_init_cell{:})
for 1:size(scan_init_cell{:},1):
cellfun(@isnumeric(scan_init_cell{:},1)
fclose(fid)
Accepted Answer
More Answers (0)
Categories
Find more on Spreadsheets in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!