MATLAB: Dot and tab delimiting

data import

Hi, I am trying to import data files that have multiple delimiters. For example, the first data line is: 1.3001 3.5602 Importing the data file and using tab delimited give me column 1 of 1.3001 and column 2 of 3.5602. This is fine, as the second column is actually the decimal number of 3.5602. However, column 1 needs split up into a column that would include 1 and a column that would include 3001. Simply trying to use both tab and '.' delimiting will give me four columns, of 1, 3001, 3, and 5602; I need 3 columns of 1, 3001, and 3.5602. Any suggestions?

Best Answer

Here is an example of using dot delimiter:
a = 599.666;
b = num2str(a);
c = strsplit(b, '.');
first_element = str2num(c{1})
second_element = str2num(c{2})