フィルターのクリア

Assignin table to the workspace and order of execution.

1 回表示 (過去 30 日間)
Davin
Davin 2014 年 9 月 4 日
コメント済み: Davin 2014 年 9 月 15 日
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 件のコメント
Geoff Hayes
Geoff Hayes 2014 年 9 月 4 日
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 2014 年 9 月 15 日
Thanks Geoff and sorry for my late response. I managed to solve the issue with the use of guidata.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeDebugging and Analysis についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by