How to read multiple arrays from a text file?

조회 수: 3 (최근 30일)
Abhirup Chaudhuri
Abhirup Chaudhuri 2019년 10월 19일
답변: Prasad Parameswaran 2019년 10월 22일
I have a file like the one I attached.I want to read this file in MATLAB and store in seperate arrays like:
A = [2, 3, 4;5, 3, 0]
B= [6, 4, 2;1, 6, 9].
Or in a cell.
Also if anyone can suggest if I have a large number of datas and where it would be not be possible to store them individually.

답변 (1개)

Prasad Parameswaran
Prasad Parameswaran 2019년 10월 22일
The "readmatrix" function may solve your issue. Refer this link for more details

카테고리

Help CenterFile Exchange에서 Text Files에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by