```Path: news.mathworks.com!newsfeed-00.mathworks.com!news.tele.dk!feed118.news.tele.dk!news.tele.dk!small.news.tele.dk!uio.no!fnord.no!news.stack.nl!aioe.org!.POSTED!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: how can i introduce this 4 by 4 matrix into that n by n matrix.
Date: Tue, 01 Jan 2013 09:56:03 -0600
Organization: Aioe.org NNTP Server
Lines: 25
Message-ID: <kbv0ug\$4l8\$1@speranza.aioe.org>
References: <kbur8s\$fnf\$1@newscl01ah.mathworks.com>
NNTP-Posting-Host: W4eUeXSEXdEr7govIpL3/w.user.speranza.aioe.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: abuse@aioe.org
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.28) Gecko/20120306 Thunderbird/3.1.20
X-Notice: Filtered by postfilter v. 0.8.2
Xref: news.mathworks.com comp.soft-sys.matlab:785710

On 1/1/2013 8:19 AM, k.vigneshwaran K wrote:
> using for loop i got n by n no of rows and columns of matrix. i have
> another one specified matrix of 4 by 4.how can i introduce this 4 by 4
> matrix into that n by n matrix.
>
> i used
> for i=1:1:n
...

> example:
> if i==3 in that particular point i want to control my loop.
>
...

Not at all clear what you really want, but in general one can do most
things in ML w/o explicit loops...taking a wild guess, try the following
at command line--

I=eye(4);      % a 4x4 matrix example
M=rand(10,4);  % another that is 10x6
M(3:6,:)=I     % put I in M at row 3

That give you any ideas on your problem????

--
```