matlab import text format -
the txt file follows.
1 1 0 2 1 3 2 9 3 10 3 1 1 when use importdata import file , following format;
1 1 0 2 1 3 2 9 nan 3 10 nan 3 1 1 what want
1 1 0 2 1 3 nan 2 9 nan 3 10 3 1 1 is there convenient way? or should make tab between each number before importing let matlab recognize first element nan? thanks!
edit
i tested , found if delimiter tab , format correct. wondering if other easy approach? thanks.
i think problem importdata() doesn't distinguish between 1 or several spaces, assumes line starts first number. tab-delimited data doesn't have issue. if creating data sets, it's best separate data using tabs or commas. may able pull off text formatting magic using textscan() though.
Comments
Post a Comment