Matlab - Increment string for an struct

 
Vista:
Imágen de perfil de Sebastian

Increment string for an struct

Publicado por Sebastian (1 intervención) el 23/10/2017 17:21:52
Hello guys.

Please I have a question
How increment string for an struct?

This is my code, please help me

I want to save in a structure that increases a different image, thank you guys

Note:
I created a function that changes me from char to string so I do not have problems in formats.

1
2
3
4
5
6
7
8
imagen = {};%cell
 
for i=1:size(bbox,1)
 
    fname = sprintf('image-%d', i) ; %string that increases
    fname = convert_CtoS( fname ); %char to string
    imagen.fname(1,1) = im2double(imcrop(img,bbox(1,:))); %save image (1,2,3...n) on image cell
end

Captura
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder