search for: nonsquare

Displaying 2 results from an estimated 2 matches for "nonsquare".

Did you mean: minsquare
2007 Jan 12
2
image() and nonsquare matrices
How do I draw non-square matrices with image() and get the axes right? Try 1: a <- matrix(rnorm(100),20,5) image(1:20,1:5,a,asp=1,xlab="label here") # No good because the axes don't touch the image Try 2: image(1:20,1:5,a,asp=1,axes=F,xlab="label here") axis(side=1,pos=0) # No good because the x axis label is floating far from the x axis. Try 3:
2004 May 27
2
block diagonal matrix function
Hello List I have just written a little function that takes two matrices as arguments and returns a large matrix that is composed of the two input matrices in upper-left position and lower-right position with a padding value everywhere else. (function definition and toy example below). I need nonsquare matrices and rowname() and colname() inherited appropriately. Two questions: (1) Is there a better way to do this? (kronecker() isn't applicable here) (2) How do I generalize it to take an arbitrary number of matrices as inputs? TIV Robin "blockdiag" <- function (m1,...