필터 지우기
필터 지우기

Read Data from Text File as Matrix

조회 수: 1 (최근 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 CenterFile Exchange에서 MATLAB Coder에 대해 자세히 알아보기

태그

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by