From: Timo Koivula on
Hi,

How can I implement 'uiopen' with the following options in an m-file.
- comma column separator and
- create vectors from each column using column names

Wizard does exactly what I want but I do not want to do those selections every time.

Thanks in advance. -Timo
From: Steven Lord on

"Timo Koivula" <koivula(a)elisanet.fi.remove.this> wrote in message
news:hle62n$3kd$1(a)fred.mathworks.com...
> Hi,
> How can I implement 'uiopen' with the following options in an m-file.
> - comma column separator and - create vectors from each column using
> column names
> Wizard does exactly what I want but I do not want to do those selections
> every time.

I'm guessing you mean the Import Wizard or UIIMPORT rather than UIOPEN.

http://www.mathworks.com/access/helpdesk/help/techdoc/ref/uiimport.html

If that's the case, use the code generation capabilities of the Import
Wizard to generate a function that you can use in the future to import data
using the same options.

http://www.mathworks.com/access/helpdesk/help/techdoc/import_export/br5wz4t.html#bqu2a8m-1

--
Steve Lord
slord(a)mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ


From: Timo Koivula on
"Steven Lord" <slord(a)mathworks.com> wrote in message <hleaip$ooi$1(a)fred.mathworks.com>...
>
> "Timo Koivula" <koivula(a)elisanet.fi.remove.this> wrote in message
> news:hle62n$3kd$1(a)fred.mathworks.com...
> > Hi,
> > How can I implement 'uiopen' with the following options in an m-file.
> > - comma column separator and - create vectors from each column using
> > column names
> > Wizard does exactly what I want but I do not want to do those selections
> > every time.
>
> I'm guessing you mean the Import Wizard or UIIMPORT rather than UIOPEN.
>
> http://www.mathworks.com/access/helpdesk/help/techdoc/ref/uiimport.html
>
> If that's the case, use the code generation capabilities of the Import
> Wizard to generate a function that you can use in the future to import data
> using the same options.
>
> http://www.mathworks.com/access/helpdesk/help/techdoc/import_export/br5wz4t.html#bqu2a8m-1
>
> --
> Steve Lord
> slord(a)mathworks.com
> comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
>

Thanks Steve, that hit the spot!
I am running version 7.0.1 which do not have "Generate m-code" button but I managed to tune the example code to give what I need.

BR Timo