1
votes

In MATLAB:

I have this independent function which runs optimal in the command line:

function datacollect()
filename = uigetfile('*.txt')
[col] = importdata(fileName)
long = columns(:,1)
lat = columns(:,2)
handles.long = long;
handles.lat = lat;

But when I make a function call inside GUIDE:

datacollect()

I get an error:

??? Reference to non-existent field 'output'.

1

1 Answers

0
votes

My guess is that there is a name collision between the handles variable in GUIDE that is being used for saving graphics handles and other data, and the one that your function uses.

Try to rename handles in your function to something else, and run again.