Hi

I am trying to figure out, if the matlab style of linear indexing of
an array is the same as in R. i.e.

when

x <- array( 1:24, dim=c(2,3,4) )
x[3]
> 3

and if the same is true in matlab, assuming that
x[n1,n2,n3] in R returns the same as  y(n1,n2,n3) when  y is a matrix in matlab

I found the following reference
http://www.mathworks.com/access/helpdesk/help/techdoc/index.html?/access/helpdesk/help/techdoc/matlab_prog/f1-86528.html#f1-86846

And it seems to be the same, but another source says it is different.
Could somebody confirm, if it is the same?

Thanks,

Rainer


-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Faculty of Science
Natural Sciences Building
Private Bag X1
University of Stellenbosch
Matieland 7602
South Africa

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to