How to access large arrays

조회 수: 3 (최근 30일)
Sana Ahmed
Sana Ahmed 2019년 6월 17일
댓글: Adam Danz 2019년 6월 26일
I am working with an array that is 76800x7 character elements. How can I view all the entries in this array and extract them into an excel spreadsheet? I can only view about 5000 or so of the last entries by printing the value in the command window.

채택된 답변

Adam Danz
Adam Danz 2019년 6월 17일
편집: Adam Danz 2019년 6월 24일
"How can I view all the entries in this array"
One way is to put the char array into an edit box where you can scroll through all 76800 rows of your data. Here's an example that also adds the row number.
% Create 10000 x 7 char array (rand chars)
ca = char(randi(40,10000,7)+40);
% Optionally append the row number to the left
ca = [num2str((1:10000)'), repmat(' ',10000,1), ca];
% Assign to edit box with vertical scroll
f = figure();
uih = uicontrol(f,'Style','Edit','Units','Normalize','Position',[0 0 1 1],...
'max',2,'String',ca,'FontName','consolas');
"and extract them into an excel spreadsheet?"
  댓글 수: 2
Sana Ahmed
Sana Ahmed 2019년 6월 26일
Worked perfectly, thank you!
Adam Danz
Adam Danz 2019년 6월 26일
Glad I could help!

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

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by