How to convert structure to variable seperately?

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 个评论

The question is not clear.
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) = ~~~~

请先登录,再进行评论。

回答(0 个)

类别

帮助中心File Exchange 中查找有关 Image Filtering and Enhancement 的更多信息

重新打开:

2015-2-5

Community Treasure Hunt

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

Start Hunting!

Translated by