5.0

5.0 | 1 rating Rate this file 99 downloads (last 30 days) File Size: 1.08 KB File ID: #19989

Place one 2D matrix inside another

by Rob Slazas

 

21 May 2008 (Updated 21 May 2008)

No BSD License  

Places a 2D matrix B into a larger 2D matrix A

Download Now | Watch this File

File Information
Description

Function that places a 2D matrix B into a larger 2D matrix A. The upper-left corner of B is placed at coordinates (r,c) in A. If (r,c) are not given, then B is put in the upper-left corner of A, a default of (1,1). Some error checking is done first to make sure that A and B are 2D matrices, A is big enough to contain B, and the given (r,c) will not spill B outside of A.

The screenshot results from calling:
putBinA(magic(8),zeros(3),2,4);

Acknowledgements

The author wishes to acknowledge the following in the creation of this submission:
INSERTROWS (v2.0, may 2008)

MATLAB release MATLAB 7.6 (R2008a)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
27 May 2008 Khai Le

Great!

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
matrices Rob Slazas 22 Oct 2008 10:02:28
place put 2d matrix inside another putbina Rob Slazas 22 Oct 2008 10:02:28
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com