I figured out the problem. The error is that I am using an older version of MATLAB, that does not support the function as I am attempting to use it. Thanks for everyone's help.
Error adding a line to an axes
1 view (last 30 days)
Andrew Vallejos on 1 Dec 2017
I am trying to add a line to a GUI axes. The line function works from the command window, but throws an error when executing it from the GUI. The error I receive is "Vectors must be the same length." Thanks in advance!
%example of line from command window
%example of code from GUI.m file
time = VideoObj.currentTime;
y = ylim(handles.axesGraph);
line(handles.axesGraph, [time,time], y, 'color', 'black');