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일

0 개 추천

a=readmatrix('1.txt');
X=a'

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Standard File Formats에 대해 자세히 알아보기

제품

릴리스

R2021b

태그

질문:

2022년 3월 15일

편집:

2022년 3월 15일

Community Treasure Hunt

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

Start Hunting!

Translated by