Error message using timer
3 views (last 30 days)
Show older comments
Hi,
Im having issues with my timers giving lots of error messages when being runned.
Im using the timer to plot a capture of an image from a camera to get a live stream of the camera.
I also want to plot the image profiles using a secon timer. They can use the same timer, but im not sure its possible.
Any idea what the issue is?
Im getting the following error;
Thestate of warning 'MATLAB:JavaEDTAutoDelegation' is 'off'.
Error而评估时间rFcn for timer 'timer-3'
Incorrectdimensions for matrix multiplication. Check that the number of columns in the first matrix matches the number of rows in the second matrix. To perform elementwise multiplication, use'.*'.
Error而评估时间rFcn for timer 'timer-3'
Incorrectdimensions for matrix multiplication. Check that the number of columns in the first matrix matches the number of rows in the second matrix. To perform elementwise multiplication, use'.*'.
Error而评估时间rFcn for timer 'timer-3'
Incorrectdimensions for matrix multiplication. Check that the number of columns in the first matrix matches the number of rows in the second matrix. To perform elementwise multiplication, use'.*'.
Error而评估时间rFcn for timer 'timer-3'
Incorrectdimensions for matrix multiplication. Check that the number of columns in the first matrix matches the number of rows in the second matrix. To perform elementwise multiplication, use'.*'.
Error而评估时间rFcn for timer 'timer-3'
Incorrectdimensions for matrix multiplication. Check that the number of columns in the first matrix matches the number of rows in the second matrix. To perform elementwise multiplication, use'.*'.
Error而评估时间rFcn for timer 'timer-3'
My timer code:
% timer for plotting camera image
functionCreateImageTimer(app)
app.timerImage = timer;
app.timerImage.StartDelay=1;
%app.timerImage.busymode='queue';
app.timerImage.ExecutionMode='fixedSpacing';% 'fixedDelay'; %
app.timerImage.Period = 0.02;
app.timerImage.TimerFcn = @(~, ~)captureImage(app);
app.timerImage.StopFcn = @(~, ~)CleanUpImageTimer(app);
end% end function
functionCleanUpImageTimer(app)
try
delete(app.timerImage)
catch
disp('error cleanup timer')
end
end% end fucntion
% timer for plotting camera image
functionCreatePlotTimer(app)
app.timerPlot = timer;
app.timerPlot.StartDelay=2;
%app.timerPlot.busymode='queue';
app.timerPlot.ExecutionMode ='fixedSpacing';% 'fixedDelay'; %
app.timerPlot.Period = 0.1;
app.timerPlot.TimerFcn = @(~, ~)updateImageprofile(app);
app.timerPlot.StopFcn = @(~, ~)CleanUpImageTimer(app);
end% end function
Answers (1)
Jan
on 27 May 2021
Incorrectdimensions for matrix multiplication. Check that the number of columns in
thefirst matrix matches the number of rows in the second matrix.
Toperform elementwise multiplication, use'.*'.
Error而评估时间rFcn for timer 'timer-3'
The only matrix multiplcation I see is:
% function updateimageprofile(app,imagefile)
app.ProfileAxes_x.XTickLabel=[0:0.2:1].*XL*app.angularSize;
What is the value of app.angularSize ?
2 Comments
Jan
on 28 May 2021
You can simply insert an output to check the value of the variable before the failing line:
disp(app.angularSize)
See Also
Categories
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!