|
What are you going to do with the result? Do you have to form the matrix?
---Bob.
"Loren Shure" <loren.shure@mathworks.com> wrote in message
news:MPG.255cbf8175b9216e989a5f@news.mathworks.com...
> In article <10da359e-f86e-496d-b2d4-a171b447d346
> @h14g2000pri.googlegroups.com>, munirpansare@gmail.com says...
>> hi
>> i want to assemble a new matrix in which same submatrix is repeated
>> many times.
>> for example k=[1,2;2,1]
>> if m=1
>> ka=[k]
>> if m=2
>> ka=[k,k;k,k]
>> if m=3
>> ka=[k,k,k;k,k,k;k,k,k]
>> and so on....
>> how can i accomplish this task?????
>> plz help if possible.
>> thanks n regards.
>>
>
> Another poster mentioned repmat. Maybe you don't even need the full
> array, but to operate with it. If so, bsxfun might be able to help.
>
> --
> Loren
> http://blogs.mathworks.com/loren
>
|