Prev: object detection
Next: maxNumCompThreads Replacement?
From: Maria_tab Manioudaki on 30 Mar 2010 05:44 I imported my data with the command importdata(filename) and return a struct s.a with the headlines and the headcolumns of my data and s.b with the rest numeric data. I want to turn the structure into a single matrix again. How do I do this? Thank you
From: us on 30 Mar 2010 06:12 "Maria_tab Manioudaki" <Belladonna_98(a)hotmail.com> wrote in message <hosh54$8eg$1(a)fred.mathworks.com>... > I imported my data with the command > importdata(filename) > and return a struct s.a with the headlines and the headcolumns of my data and s.b with the rest numeric data. > I want to turn the structure into a single matrix again. > How do I do this? > Thank you a hint: help struct2cell; help cell2mat; us
From: Maria_tab Manioudaki on 30 Mar 2010 06:23 "us " <us(a)neurol.unizh.ch> wrote in message <hosipk$1lh$1(a)fred.mathworks.com>... > "Maria_tab Manioudaki" <Belladonna_98(a)hotmail.com> wrote in message <hosh54$8eg$1(a)fred.mathworks.com>... > > I imported my data with the command > > importdata(filename) > > and return a struct s.a with the headlines and the headcolumns of my data and s.b with the rest numeric data. > > I want to turn the structure into a single matrix again. > > How do I do this? > > Thank you > > a hint: > > help struct2cell; > help cell2mat; > > us The s.b file has the form A A1 A2 A3... B [] [] [] B1 [] [] [] B2 [] [] [] .. when i use cell2mat i have an error that contents are not of the same type Furthermore, I do not just want to put the 2 matrices one after another, but i want the initial matrix where there are the headerlines and the corresponding numeric data ..
From: us on 30 Mar 2010 06:33 "Maria_tab Manioudaki" <Belladonna_98(a)hotmail.com> wrote in message <hosje6$ai1$1(a)fred.mathworks.com>... > "us " <us(a)neurol.unizh.ch> wrote in message <hosipk$1lh$1(a)fred.mathworks.com>... > > "Maria_tab Manioudaki" <Belladonna_98(a)hotmail.com> wrote in message <hosh54$8eg$1(a)fred.mathworks.com>... > > > I imported my data with the command > > > importdata(filename) > > > and return a struct s.a with the headlines and the headcolumns of my data and s.b with the rest numeric data. > > > I want to turn the structure into a single matrix again. > > > How do I do this? > > > Thank you > > > > a hint: > > > > help struct2cell; > > help cell2mat; > > > > us > > The s.b file has the form > A A1 A2 A3... > B [] [] [] > B1 [] [] [] > B2 [] [] [] > . > > when i use cell2mat i have an error that contents are not of the same type > > Furthermore, I do not just want to put the 2 matrices one after another, > but i want the initial matrix where there are the headerlines and the corresponding numeric data > . well... for obvious reasons, this is not a simple task 1) why would you want to do this at all(?)... 2) you can carve out the numeric part and convert it... 3) you can convert the numeric part into CHAR strings and go from there... for 3) you may want to look at this FEX utility http://www.mathworks.com/matlabcentral/fileexchange/23840 us
From: Maria_tab Manioudaki on 30 Mar 2010 06:46
"us " <us(a)neurol.unizh.ch> wrote in message > > Furthermore, I do not just want to put the 2 matrices one after another, > > but i want the initial matrix where there are the headerlines and the corresponding numeric data > > . > > well... for obvious reasons, this is not a simple task > 1) why would you want to do this at all(?)... > 2) you can carve out the numeric part and convert it... > 3) you can convert the numeric part into CHAR strings and go from there... > > for 3) you may want to look at this FEX utility > > http://www.mathworks.com/matlabcentral/fileexchange/23840 > > us :) 1) I want to process the numeric data but then i want to retrieve the headerlines 2) OK, but how I will get the initial table? Is there any way where i can load the data 'bypassing' the headerlines? 3) same as 2... how i will get the initial table (even though the data are chars), how i will put the num-char table in the correct position? 4) thanks for the link,i will check it Maria |