Read Data from Text File as Matrix

2 ビュー (過去 30 日間)
Rounak Saha Niloy
Rounak Saha Niloy 2022 年 3 月 15 日
編集済み: Arif Hoq 2022 年 3 月 15 日
I have a text file with name "1.txt". The Content of the file is as follows-
1.20
2.30
3.50
4.88
I want to read the text file and get it as-
X = [1.20 2.30 3.50 4.88]
How do I do this?

採用された回答

Arif Hoq
Arif Hoq 2022 年 3 月 15 日
編集済み: Arif Hoq 2022 年 3 月 15 日
a=readmatrix('1.txt');
X=a'

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMATLAB Coder についてさらに検索

タグ

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by