search for: dimb

Displaying 3 results from an estimated 3 matches for "dimb".

Did you mean: dim
1999 Jul 20
2
tensor() function and sets
...quot; <- function (x, y) x[!(x %in% y)] "tensor" <- function (A, B, da, db) { # tensor product of A and B through da and db no.na <- is.null(na <- dimnames(A <- as.array(A))) dima <- dim(A) no.nb <- is.null(nb <- dimnames(B <- as.array(B))) dimb <- dim(B) if (any(dima[da] != dimb[db])) stop("Mismatched dimensions") kpa <- setdiff(seq(along = dima), da) kpb <- setdiff(seq(along = dimb), db) # fix up the dimnames (see outer) if (no.na && no.nb) nms <- NULL else {...
2007 Dec 19
3
array addition
Hi suppose I have two arrays x1,x2 of dimensions a1,b1,c1 and a2,b2,c2 respectively. I want x = x1 "+" x2 with dimensions c(max(a1,a2), max(b1,b2),max (c1,c2)) with x[a,b,c] = x1[a1,b1,c1] + x2[a2,b2,c2] if a <=min(a1,a2) , b<=min (b1,b2), c<=min(c1,c2) and the other bits either x1 or x2 or zero according to whether the coordinates are "in range" for
2007 Jul 29
2
write.csv
Hi, I want to save an array(say, array[6,7,8]) write a cvs file. How can I do that??? can I write in one file? if I could not write in one file, i want to use a loop to save in different files (in the array[6,7,8], should be 8 csv files), such as the filename structure should be: file ="filename" +str(i) +"." +"csv" Many thanks. [[alternative HTML version