Prev: ode45
Next: Read data from txt
From: Nehal on 5 Aug 2010 13:20 I have an image array. I want to convert the elements into matrix or vector. The matrix will have only 1 column and the number of row will be equal to the number of elements of that image. For example: if the binaryImage array has some values like this.... imageArray = 1 2 3 4 5 6 7 8 9 I want to convert the imageArray into a matrix like... v= [1 2 3 4 5 6 7 8 9] Can anyone help me..? plz..
From: Joseph on 5 Aug 2010 13:31 Nehal, imageArray = reshape(imageArray',9,1); note: I transposed the matrix pre-reshaping it. "Nehal " <arnab620(a)yahoo.com> wrote in message <i3ersm$pkr$1(a)fred.mathworks.com>... > I have an image array. I want to convert the elements into matrix or vector. The matrix will have only 1 column and the number of row will be equal to the number of elements of that image. > > For example: > if the binaryImage array has some values like this.... > > imageArray = 1 2 3 > 4 5 6 > 7 8 9 > > I want to convert the imageArray into a matrix like... > > v= [1 > 2 > 3 > 4 > 5 > 6 > 7 > 8 > 9] > > Can anyone help me..? plz..
From: Nehal on 5 Aug 2010 13:55 "Joseph " <don'twannapostit(a)nopers.com> wrote in message <i3esgs$6r7$1(a)fred.mathworks.com>... > Nehal, > imageArray = reshape(imageArray',9,1); > > note: I transposed the matrix pre-reshaping it. > > > > "Nehal " <arnab620(a)yahoo.com> wrote in message <i3ersm$pkr$1(a)fred.mathworks.com>... > > I have an image array. I want to convert the elements into matrix or vector. The matrix will have only 1 column and the number of row will be equal to the number of elements of that image. > > > > For example: > > if the binaryImage array has some values like this.... > > > > imageArray = 1 2 3 > > 4 5 6 > > 7 8 9 > > > > I want to convert the imageArray into a matrix like... > > > > v= [1 > > 2 > > 3 > > 4 > > 5 > > 6 > > 7 > > 8 > > 9] > > > > Can anyone help me..? plz.. Thank You. I got it... :)
|
Pages: 1 Prev: ode45 Next: Read data from txt |