From: pier on 14 May 2010 20:35 hi i have a matrix 12x52 every four column rapresent for me the coordinate x,y,rssi and lqi So i need to obtaine 13 matrix with size 12x4!!!! how can i do this????? please help me...........
From: us on 14 May 2010 21:09 "pier " <bombociccio1(a)libero.it> wrote in message <hskq7q$74m$1(a)fred.mathworks.com>... > hi i have a matrix 12x52 > every four column rapresent for me the coordinate x,y,rssi and lqi > So i need to obtaine 13 matrix with size 12x4!!!! > how can i do this????? > please help me........... a hint: help reshape; us
From: Matt Fig on 14 May 2010 21:53 Let's take a simpler example. A matrix 2-by-12 which needs to be broken into 4 2-by-3 matrices. Store each new matrix as a cell in a cell array. % Data A = round(rand(2,12)*100) % Engine Ac = mat2cell(A,2,ones(1,4)*3); % Now check a couple of the arrays. Ac{1} Ac{4}
From: pier on 15 May 2010 05:45 "Matt Fig" <spamanon(a)yahoo.com> wrote in message <hskuq0$d9i$1(a)fred.mathworks.com>... > Let's take a simpler example. A matrix 2-by-12 which needs to be broken into 4 2-by-3 matrices. Store each new matrix as a cell in a cell array. > > % Data > A = round(rand(2,12)*100) > > % Engine > Ac = mat2cell(A,2,ones(1,4)*3); > % Now check a couple of the arrays. > Ac{1} > Ac{4} hi thx for the answer.... but with your instruction i have obtained only 2 matrix 2x3 using matrix A:2x12 i'm tryng to obtained four matric 2x3!!!! right????? where is the error? PS: i tried also function RESHAPE but as output obtained only 1 matrix even if customized
From: us on 15 May 2010 06:31 "pier " <bombociccio1(a)libero.it> wrote in message <hslqf5$oqb$1(a)fred.mathworks.com>... > "Matt Fig" <spamanon(a)yahoo.com> wrote in message <hskuq0$d9i$1(a)fred.mathworks.com>... > > Let's take a simpler example. A matrix 2-by-12 which needs to be broken into 4 2-by-3 matrices. Store each new matrix as a cell in a cell array. > > > > % Data > > A = round(rand(2,12)*100) > > > > % Engine > > Ac = mat2cell(A,2,ones(1,4)*3); > > % Now check a couple of the arrays. > > Ac{1} > > Ac{4} > > hi thx for the answer.... but with your instruction i have obtained only 2 matrix 2x3 > using matrix A:2x12 i'm tryng to obtained four matric 2x3!!!! > right????? > where is the error? simple: copy/paste the nice solution, LOOK AT it carefully, THINK ABOUT it, then do whos Ac; {% Name Size Bytes Class Attributes Ac 1x4 432 cell %} % with Ac.' {% % ans = [2x3 double] [2x3 double] [2x3 double] [2x3 double] %} us
|
Next
|
Last
Pages: 1 2 3 Prev: Fitting a surface Next: export data sheet with dependecies, comments, file names and paths |