Prev: Newbie Newey-West
Next: rgb2hsv
From: Bruce on 9 Jan 2010 21:45 Is there a way to insert/fastinsert a Vector of say 100 elements as a single row entry in an Access database colomn? /Bruce
From: Oleg Komarov on 14 Jan 2010 18:22 "Bruce " > Is there a way to insert/fastinsert a Vector of say 100 elements as a single row entry in an Access database colomn? > > /Bruce Whats the input type and the desired column type. do you want to concatenate it? How? Oleg
From: Bruce on 15 Jan 2010 22:21 "Oleg Komarov" <oleg.komarovRemove.this(a)hotmail.it> wrote in message <hio8us$t2s$1(a)fred.mathworks.com>... > "Bruce " > > Is there a way to insert/fastinsert a Vector of say 100 elements as a single row entry in an Access database colomn? > > > > /Bruce > > Whats the input type and the desired column type. > do you want to concatenate it? How? > > Oleg The vector is standard matlab double. I've come up with a kludge but I was hoping someone had a better solution. What I've done is to set my Access column data type to memo which will hold 64K characters. Then, in matlabe I convert my number vector to a string array with the desired precision and then insert the string. When I query Access and get my string back I convert it back into a double. Of course there is a loss of precision and a limitation on the size but this solution works. I'm still hoping there is a more elegant solution that someone could suggest. /Bruce
From: Oleg Komarov on 16 Jan 2010 06:55 "Bruce " <hio8us$t2s$1(a)fred.mathworks.com>... > > "Bruce " > > > Is there a way to insert/fastinsert a Vector of say 100 elements as a single row entry in an Access database colomn? > > > > > > /Bruce > > > > Whats the input type and the desired column type. > > do you want to concatenate it? How? > > > > Oleg > > The vector is standard matlab double. I've come up with a kludge but I was hoping someone had a better solution. What I've done is to set my Access column data type to memo which will hold 64K characters. Then, in matlabe I convert my number vector to a string array with the desired precision and then insert the string. When I query Access and get my string back I convert it back into a double. Of course there is a loss of precision and a limitation on the size but this solution works. > > I'm still hoping there is a more elegant solution that someone could suggest. > > /Bruce This is the solution I was thinking too. Btw, why do you want to store a vector in a single cell of an Access column? If say you have 100, 10 by 1, vectors you can store all the 1000 values (one per access cell) flaggin an additional column with the number of the vector... (float) (int, smallint, whatever) VecValues WhichVec 10.1 1 12.3 1 14.1 1 .... ... 15.9 3 Oleg
From: Bruce on 18 Jan 2010 21:25 "Oleg Komarov" <oleg.komarovRemove.this(a)hotmail.it> wrote in message <his9eq$pij$1(a)fred.mathworks.com>... > "Bruce " <hio8us$t2s$1(a)fred.mathworks.com>... > > > "Bruce " > > > > Is there a way to insert/fastinsert a Vector of say 100 elements as a single row entry in an Access database colomn? > > > > > > > > /Bruce > > > > > > Whats the input type and the desired column type. > > > do you want to concatenate it? How? > > > > > > Oleg > > > > The vector is standard matlab double. I've come up with a kludge but I was hoping someone had a better solution. What I've done is to set my Access column data type to memo which will hold 64K characters. Then, in matlabe I convert my number vector to a string array with the desired precision and then insert the string. When I query Access and get my string back I convert it back into a double. Of course there is a loss of precision and a limitation on the size but this solution works. > > > > I'm still hoping there is a more elegant solution that someone could suggest. > > > > /Bruce > > This is the solution I was thinking too. > Btw, why do you want to store a vector in a single cell of an Access column? > > If say you have 100, 10 by 1, vectors you can store all the 1000 values (one per access cell) flaggin an additional column with the number of the vector... > > (float) (int, smallint, whatever) > VecValues WhichVec > 10.1 1 > 12.3 1 > 14.1 1 > ... ... > 15.9 3 > > Oleg Thanks for the feedback. I thought about just letting it store each value in a new row but I have 6 keys that go with each vector I save and I couldn't think of a clean way to query the data without saving all the keys with each row. And then, knowing where the vector started and ended when I insert multiple instances of the vector with the same keys (except by using my autoincriment row counter -- but thats another complication in the queiry I would rather try to avoid). /Bruce
|
Pages: 1 Prev: Newbie Newey-West Next: rgb2hsv |