From: TideMan on
On Aug 1, 10:16 am, "dale " <persa...(a)gmail.com> wrote:
> guys,
>
> all i am trying to ask is a basic way to kind of concatentate my matrix each time the for loop iterates.
>
> it's urgent .any suggestion welcome
>
> thanks
>
> dale

First of all, don't panic!

Your code appears to be working correctly, but I re-iterate dpb's
question:
Where is your print statement that writes to the textfile?
There is no file allocation or write statement in your code, yet you
say you get data in a textfile. How?
There appears to be some magic happening here.
From: dale on
Tideman,

thanks for the reply man.I included the print function below. Sorry I forgot it



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clc; clear all;
Rs1 = [ 0 0 0 0 0 0 0 0 0 0 0 0;
0 0 0 0 0 0 0 0 0 0 0 0;
0 0 0 0 0 0 0 0 0 0 1 0;
0 0 0 0 0 0 0 0 0 0 1 0;
0 0 0 0 0 0 0 0 0 1 1 0;
0 0 0 0 0 0 0 0 0 1 1 0;
0 0 0 0 0 0 0 0 0 0 0 0;
0 0 0 0 0 0 2 2 2 2 0 0;
0 3 3 3 0 0 2 2 2 2 2 0;
0 3 3 3 0 0 0 0 0 0 0 0;
0 0 0 0 0 0 0 0 0 0 0 0;
0 0 0 0 0 0 0 0 0 0 0 0]


STATS = regionprops(Rs1, 'PixelList' )

fv=struct2cell(STATS)

[arbitary,num_of_regions] = size(fv)



% cc = fv{num_of_regions}

for i = 1:num_of_regions
prints = fv{i}
dlmwrite('prints.txt',prints) % the write to text file
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%