Hello, I'm working on a part of a GUI where I have to load a .mat file that contains some data vectors from the one the user will write one of the data vector's name in order to use it and plot it, I thought first on only leave the instructions with a edit text function but I then thought on using a push button to do everything, I'm thinking on make a variable that will save the name of the needed data vector and with that variable find the vector from the .mat file and plot it, but I'm having problems with everything. This is some of what I have tried:
load('datosnoembarazo.mat')
global ingesta
ingesta=char(get(handles.edit3,'String'));
assignin('base','ingesta',ingesta);
axes(handles.axes4);
plot(ingesta)
grid on;
I know that the error I have there is that I'm sending the characters to be plotted, but how can I make that the typed characters get recognized as the vector's name? Also I think that this code is not loading the .mat file, because I don't see it in the workspace, can you please help me with this? I'm really new into GUI programming, thanks!