For Programmers: Free Programming Magazines  


Home > Archive > Matlab > May 2005 > Load data form txt-file with dialog box









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Load data form txt-file with dialog box
Milan

2005-05-31, 4:05 pm

Hi,
I want to create a dialog box, to load a txt-file with measurement
data into my m-file. Before, the command was:
load FX1.txt -ascii;

Now I want to create something like:
[FileName,PathName] = uigetfile(...)
with, for example, m1 as FileName. But the variable I create does not
content the measurement data, but only the name (m1 = FX1.txt).
How can I load the data using a dialog box?

Thanks very much
Milan
Marcel

2005-05-31, 9:01 pm

Milan wrote:
>
>
> Hi,
> I want to create a dialog box, to load a txt-file with measurement
> data into my m-file. Before, the command was:
> load FX1.txt -ascii;
>
> Now I want to create something like:
> [FileName,PathName] = uigetfile(...)
> with, for example, m1 as FileName. But the variable I create does
> not
> content the measurement data, but only the name (m1 = FX1.txt).
> How can I load the data using a dialog box?
>


Try

FX1 = load([PathName filesep FileName],'-ascii');

after checking that FileName is not empty (ESC in the dialog)

Marcel

> Thanks very much
> Milan

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com