How to separate imported data from notepad to two separate columns ?
古いコメントを表示
I have 2 columns of data from notepad. However, these 2 columns appear as a variable. I can't plot a graph using the data as I need to separate the 2 columns to x(1 column) and y(1 column) Thanks I am new to MATLAB I accidently accepted the answer for my previous question. I still dont know how to separate the columns
4 件のコメント
Natalia Wong
2015 年 11 月 21 日
Matthew Crema
2015 年 11 月 21 日
編集済み: Matthew Crema
2015 年 11 月 21 日
I think you have several lines of code that you don't need, and depending on the file you may be able read the data into MATLAB with one line of code. For example,
z = textread('badminton data.dat.txt')
but anyway once you have the data in MATLAB you should be able to separate the columns using the colon (:) operator.
For example,
x = z(:,1);
y = z(:,2);
Natalia Wong
2015 年 11 月 22 日
Natalia Wong
2015 年 11 月 22 日
回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Logical についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!