If I put my cursor on line 4 of this file:
a = 1;
x = linspace(0,4*pi,1000);
y = a.*sin(x);
plot(x,y);
The function ConnectButtonPushed calls splitCode which outputs a scalar string object called sweepVar. Because it is always a scalar string object, isempty(sweepVar) is never true, so the code assumes it found valid line of code and does not issue the expected warning.
If I put my cursor on line 4 of this file:
The function
ConnectButtonPushedcallssplitCodewhich outputs a scalar string object calledsweepVar. Because it is always a scalar string object,isempty(sweepVar)is never true, so the code assumes it found valid line of code and does not issue the expected warning.