Accessing Table from Workspace from Matlab Editor.
Show older comments
Hello,
I have a created a GUI which gets data from different sources, apply some modifications on these tables. For some other calculations, I need to access these tables in order to modify them again for other calculations.
The first thing I did, is to create a listbox which will scan my workspace
vars = evalin('base','who'); set(handles.listbox32,'String',vars)
Then each time I will click on one of the variables, i will be able to transform the dataset, for example here, as a FINTS.
i have 2 tables in my ws : A and B but can j or K.
so my code is the following :
for i = 1:numel(who)
if get(handles.listbox32, 'value') == i % normally A will correspond to 1 and B to 2.
%Access the Table. and make a fints(table) tvar = evalin('base','who') TableName = char(tvar(i,1)) Dates = TableName(:,1) Data = TableName(:,2) fints(Dates,Data)
This is not working mainly because TableName is being considered as a string and hence no kind of relation with table A.
Do you know how to make the link with the first table in my workspace and calibrate it each time I click on any handles.listbox which will point to some other table....
Thank you very much
Davin.
Accepted Answer
More Answers (0)
Categories
Find more on Tables 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!