How can i change column names in a uitable to the last picture read

3 views (last 30 days)
Hello, I am trying load pictures using a button and then store the title of the picture as the column name in a uitable.
So I can read in the data fine and set the first title with
filename, pathname,p] = uigetfile({'*.png;*.tif',},'select an image');
set(handles.uitable1,'columnname',filename);
my problem is how can i set the next column name with a picture title name if i don't know the picture name in advance. I tried cells using filename{end+1} for the next file but columnname has to be in the form of a string.
thank you, -jon

Accepted Answer

Walter Roberson
Walter Roberson on 20 Jul 2015
[filename, pathname,p] = uigetfile({'*.png;*.tif',},'select an image');
fn = cellstr(filename);
set(handles.uitable1,'columnname',fn);
This also works with multiselect turned on.

More Answers (0)

Categories

Find more on Migrate GUIDE Apps in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!