Azzera filtri
Azzera filtri

Assignin table to the workspace and order of execution.

2 visualizzazioni (ultimi 30 giorni)
Davin
Davin il 4 Set 2014
Commentato: Davin il 15 Set 2014
Hello,
I have a question on this command assignin. I am coding to filter some monthly data into quarterly, during this process, I have created some intermediary tables, using assignin, but the last statement of my code, will horzcat a date column and a data column, bearing in mind that the i pushed out the date and data array with assignin on the base workspace. But when the code comes to the horzcat, the tables which are needed to do the horzcat are not created yet so i have an error as follows :
Undefined function or variable 'datesQ'.
Error in GlobalMacroGui>uipanel13_SelectionChangeFcn (line 722) test = horzcat(datesQ,dataQ)
Error in gui_mainfcn (line 96) feval(varargin{:});
Error in GlobalMacroGui (line 42) gui_mainfcn(gui_State, varargin{:});
Error in @(hObject,eventdata)GlobalMacroGui('uipanel13_SelectionChangeFcn',get(hObject,'SelectedObject'),eventdata,guidata(get(hObject,'SelectedObject')))
Error in hgfeval (line 63) feval(fcn{1},varargin{:},fcn{2:end});
Error in uitools.uibuttongroup/childAddedCbk>manageButtons (line 79) hgfeval(cbk, source, evdata);
Error while evaluating uicontrol Callback
I do the get the creation of the tables only after this...
Is there another way to create these tables so that i can concatenate the 2 arrays. Or is there a way to wait until the creation of the table and then execute the cat...
I would much appreciate any help.
Thank u
D
  2 Commenti
Geoff Hayes
Geoff Hayes il 4 Set 2014
Davin - you may have to post more of the code from your uipanel13_SelectionChangeFcn so that we can see how you are using assignin. Are you actually using this function to create the datesQ and dataQ local variables, and if so, why? What is the reason for assigning these variables to the base workspace? Since you are using a GUI, there are alternatives to share user-defined data between callbacks, namely guidata to set and retrieve data within the GUI.
Davin
Davin il 15 Set 2014
Thanks Geoff and sorry for my late response. I managed to solve the issue with the use of guidata.

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su Debugging and Analysis in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by