Read Data from Text File as Matrix

1 次查看(过去 30 天)
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 CenterFile Exchange 中查找有关 String 的更多信息

标签

产品


版本

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by