Hi,
I have this input file as a .txt here
2
0.0 1.0 6.283185307
0.0 -1.0 -6.283185307
But when I use importdata, it gives me a line vector as stated:
data =
2.0000
0
1.0000
6.2832
0
-1.0000
-6.2832
I reckon it is due to the first line of the .txt file being a single integer. I can't change the contents of the .txt file.
Any idea how to fix this?
1 Comment
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/479311-importdata-not-importing-as-a-cell-array-and-instead-as-a-column-vector#comment_743275
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/479311-importdata-not-importing-as-a-cell-array-and-instead-as-a-column-vector#comment_743275
Sign in to comment.