|
"Jan Simon" <matlab.THIS_YEAR@nMINUSsimon.de> wrote in message <i1d6n4$kjm$1@fred.mathworks.com>...
> Dear Garrett,
>
> > I am trying to use an edit text box to input a file name so that I can then read the file in when I use a push button.
>
> > c = get(handles.edit1,'string')
> > x = dlmread(c,' ');
> > ??? Error using ==> dlmread at 55
> > Filename must be a string.
>
> You can use the debugger (e.g. "dbstop if error") to find out, that after
> c = get(handles.edit1,'string')
> c is a cell string and not a CHAR vector. Using CHAR converts a cell string to a string, as you have posted already. Another way would be:
> name = c{1};
> x = dlmread(c,' ')
>
> Good luck, Jan
Thanks for the explanation, that makes more sense now. Is there a reason that after I push the calculate button I also have to hit enter in the command line for the dlmread to initialise?
|