How to save a contents of a cell array to multiple text files?

조회 수: 1 (최근 30일)
DEEPAK PHCSFI17041149
DEEPAK PHCSFI17041149 2017년 11월 29일
댓글: DEEPAK PHCSFI17041149 2017년 12월 4일
I have a 100x8 Cell Array. Each of the elements of this cell array is a 10x13xN matrix.(N varies across rows) Now, I want to save each of these 10x13xN matrices into .txt files, so that I will get 100 text files. How can I do this?
  댓글 수: 7
Stephen23
Stephen23 2017년 11월 29일
편집: Stephen23 2017년 11월 29일
"Or saving it as a variable with names in a sequential order will do for now, that is like 100 variables"
That would be about the worst way of doing this. Read this to know why magically creating or accessing hundreds of variables is a slow, complex, buggy, inefficient way to write code:
You should just use one variable and indexing. Indexing is simple, neat, and very efficient. You should follow KSSV's advice.
DEEPAK PHCSFI17041149
DEEPAK PHCSFI17041149 2017년 12월 4일
Thanks Stephen and KSSV, will follow as insisted.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Matrix Indexing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by