How to read multiple arrays from a text file?

7 ビュー (過去 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.
  2 件のコメント
per isakson
per isakson 2019 年 10 月 19 日
Abhirup Chaudhuri
Abhirup Chaudhuri 2019 年 10 月 21 日
Thanks per.

サインインしてコメントする。

回答 (1 件)

Prasad Parameswaran
Prasad Parameswaran 2019 年 10 月 22 日
The "readmatrix" function may solve your issue. Refer this link for more details

カテゴリ

Help Center および File ExchangeText Files についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by