Path: news.mathworks.com!not-for-mail
From: "Mohammed " <mohammedouallal2@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Fill cell array with matrix elements
Date: Sat, 26 Oct 2013 11:37:08 +0000 (UTC)
Organization: universitat politecnica de valencia
Lines: 23
Message-ID: <l4g9h4$c17$1@newscl01ah.mathworks.com>
Reply-To: "Mohammed " <mohammedouallal2@gmail.com>
NNTP-Posting-Host: rubyext-00-ls.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1382787428 12327 172.20.102.176 (26 Oct 2013 11:37:08 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 26 Oct 2013 11:37:08 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 3804096
Xref: news.mathworks.com comp.soft-sys.matlab:804386

Hello everybody,

I have a cell array of zeros, and I wanted to fill it with elements of another matrix

the ex is as follow;

Temporary_Quad{1,1}=FieldStGP_Mixed_Quad(1:4,:); % size of Temporary_Quad is 4
Temporary_Quad{2,1}=FieldStGP_Mixed_Quad(5:7,:); % size of Temporary_Quad is 3
Temporary_Quad{3,1}=FieldStGP_Mixed_Quad(8:11,:); % size of Temporary_Quad is 4
Temporary_Quad{4,1}=FieldStGP_Mixed_Quad(12:15,:); %size of Temporary_Quad is 4
Temporary_Quad{5,1}=FieldStGP_Mixed_Quad(16:19,:);
Temporary_Quad{6,1}=FieldStGP_Mixed_Quad(20:23,:);
Temporary_Quad{7,1}=FieldStGP_Mixed_Quad(24:27,:);
Temporary_Quad{8,1}=FieldStGP_Mixed_Quad(28:30,:);
...
...
...

how can i do that using a loop?

I really need your help, because I am getting stuck right there!!

Thanks alot!