I have a GUI that contains a TextArea. I read in a file that is 20,000 x 16 and convert each row to a string, so the resulting table is 20,000 x 1. Then I read that new "fits_text" table into the TextArea and use a formatSpec string to display it in neat columns, using tabs.
fits.TextArea.Value = fits_text;
So far, so good. Is there a way to click on a row of the text and determine which row it was, so I can process the data at that row in my original table (which is 20000 x 16)? Or do I need to use a UITable instead? I'm not sure I can fit a 16-column UITable into this GUI window.
Bonus question: It takes me about 7 minutes to re-format all 20,000 rows for display, using a "for" loop. I am pre-allocating space for the table. There must be a faster way. I can do this in Python in just a few seconds (but it doesn't look nearly as nice).
for i = 1:height(box_data)
fits_text{i,1} = sprintf(formatSpec, string(box_data{i,:}));