MATLAB: An array for multiple LHS assignment cannot be empty

errorlhsMATLABuser defined functions

I'm pretty new to MATLAB and I need to use a graphing function inside of another function. Both are user-defined functions.
function 1:
function [ymax,Timpact] = Projectile2(v0,angle,y0)
blah blah finds ymax and Timpact blah blah
blah blah makes t and y vectors blah blah
[] = AnimatedPlot(t,y,0.1);
function 2:
[] = AnimatedPlot(t,y,p);
blah blah graphs as an updating plot that pauses for (p) blah blah
When I run the first function, I receive this error message: An array for multiple LHS assignment cannot be empty.
What should I do to fix this problem and be able to graph my first points using the second function?

Best Answer

Do not use the syntax
[] = SomeFunction()
as a call. If you do not want to return anything, then just leave out the assignment. For example just
AnimatedPlot(t,y,0.1);