Info

This question is closed. Reopen it to edit or answer.

Gui, timer function, CAT arguments error

1 view (last 30 days)
adrs
adrs on 28 Jan 2015
Closed: MATLAB Answer Bot on 20 Aug 2021
Hi, Could you please help me?
I have created a GUI in Matlab and I want to excute a certain function every x seconds. I have used a timer function, but I am getting the following error:
??? Error while evaluating TimerFcn for timer 'timer-11'
CAT arguments dimensions are not consistent.
I don't know because I am getting the CAT arguments error.
The code is something like this.
I create the timer function just before the GUI is made visible:
handles.tmr = timer('TimerFcn',{@TmrFcn,handles.guifig},'BusyMode','Queue',...
'ExecutionMode','FixedRate','Period',0.5);
Then in the core code of the GUI, I excute the timer function once:
if (i>610)&&(x==0)
start(handles.tmr);
x=1;
end;
The timer function is as follow:
function TmrFcn(src,event,handles) %Timer function
global v2 %where v2 is a vector of constant size that keeps changing its content.
handles = guidata(handles);
[loc]=PruebaVF(v2); % Here I call a function to be executed.
end
Thanks
  1 Comment
Geoff Hayes
Geoff Hayes on 28 Jan 2015
adrs - what is happening in the PruebaVF function? Is there some concatenation going on there? Run the following command in the Command Window
dbstop if error
and then relaunch your GUI. When the error occurs, the debugger will pause at the line that has thrown the error. What is happening at that line?

Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!