Problems with uigetfile('*.txt'), GUIDE push buttons and import data in matlab workspace
1 view (last 30 days)
Show older comments
Hi
I'm trying to create a GUIDE push button that open a txt file and then load the information in a matrix, the code works perfectly in a matlab document, but in a GUI the data is not loaded in the matlab workspace.
This is the code that I'm using:
% --- Executes on button press in pushbutton1. function pushbutton1_Callback(hObject, eventdata, handles)
[FileName,PathName] = uigetfile('*.txt','Select an txt file');
Signal = importdata([PathName FileName]);
l = length(Signal);
X = Signal(:,1);
Y = Signal(:,2);
Please help me
Thanks
Andrea
0 Comments
Answers (0)
See Also
Categories
Find more on Migrate GUIDE Apps in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!