Add inputs to more than one row in a cell array in matlab

Posted by ZaZu on Stack Overflow See other posts from Stack Overflow or by ZaZu
Published on 2010-05-16T21:32:31Z Indexed on 2010/05/16 21:50 UTC
Read the original article Hit count: 151

Filed under:
|

Hi there,

I would like to know how can I get certain inputs and put them in more than one row in the cell array ... I basically want an array that updates one input per row in ever loop. The loop is looped 30 times, so I want to have 30 rows and 2 columns ( x and y columns)

I have this code :

For N=1:30
    .
    .
    .
    Binary = bwlabel(blacknwhite);
    s = regionprops(Binary,'centroid');
    centroids = cat(1, s.Centroid);
    hold(imgca,'on')
    plot(imgca,centroids(1,1), centroids(1,2),'r*')
    .
    .
    .
    end

I dont think this does what I want ... only the first row is updated in my loop .. So how can I create this cell array ?

If you want more info please tell me and I will update it right away.

Thanks !

© Stack Overflow or respective owner

Related posts about matlab

Related posts about arrays