Adding a column to a datafile

1 回表示 (過去 30 日間)
anonymous
anonymous 2019 年 2 月 23 日
編集済み: anonymous 2019 年 2 月 23 日
How to I add a column to a data text file?
  1 件のコメント
madhan ravi
madhan ravi 2019 年 2 月 23 日
where is your file?

サインインしてコメントする。

回答 (1 件)

Star Strider
Star Strider 2019 年 2 月 23 日
Try this:
datafile = [3750 555 10266
3750 555 0
3750 555 0
3750 555 0
3750 555 0
3750 555 0
3750 555 0
3750 555 0
3750 555 0];
new_datafile = [datafile (0:0.01:((size(datafile,1)-1)*0.01))']
producing:
new_datafile =
3750 555 10266 0
3750 555 0 0.01
3750 555 0 0.02
3750 555 0 0.03
3750 555 0 0.04
3750 555 0 0.05
3750 555 0 0.06
3750 555 0 0.07
3750 555 0 0.08
I just used a section of your file here to demonstrate my code. It will work on your entire file.

カテゴリ

Help Center および File ExchangeLarge Files and Big Data についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by