How to convert structure to variable seperately?

1 view (last 30 days)
heo jaemu
heo jaemu on 5 Feb 2015
Reopened: heo jaemu on 5 Feb 2015
I want to same effect. Like this,
a1 = imread('2015_01_26_1.jpg);
a2 = imread('2015_01_26_2.jpg);
a3 = imread('2015_01_26_3.jpg);
a4 = imread('2015_01_26_4.jpg);
I try this.
a = dir('C:~~~~~\*.jpg');
for i = 1 : length(a)
filename = strcat('C:~~~~\',a(i).name);
I = imread(filename);
end
how can I get same result?? I want to variables.
  2 Comments
heo jaemu
heo jaemu on 5 Feb 2015
I have a structure like above image.
the structure is that load all jpg files in folder.
(so many files i have, so i want to read automatically.)
but, I can't use structure.
I want to variables.
and I want to answer like this,
image(i) = ~~~
for i = 1 : length(a)
~~~~
end
finally,
image(i) = ~~~~ % = imread('~~~.jpg'
image(2) = ~~~~

Sign in to comment.

Answers (0)

Categories

Find more on Data Type Conversion 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!