How to extract only numbers from this .txt file

18 ビュー (過去 30 日間)
Mike Krause
Mike Krause 2020 年 12 月 12 日
コメント済み: Mike Krause 2020 年 12 月 13 日
I am trying to take only the numbers from this file and put them into a column vector but I can't seem to get Matlab to read around the wording. I'm assuming that it should be fairly simple, but since i cant change the formatting of the .txt file that will be used I am a bit stuck.
  1 件のコメント
Mike Krause
Mike Krause 2020 年 12 月 13 日
Works well! Thank you

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

採用された回答

Image Analyst
Image Analyst 2020 年 12 月 13 日
Try this:
fileName = 'ProjectPartATestInput.txt';
allData = readmatrix(fileName)
numbers = allData(:, 2);

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeFile Operations についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by