In matlab, I stored every line I plotted like so:
app.cplxPlot(app.cplxPlotNumber)= plot(app.UIAxes[app.var.cplx(1);app.var.cplx(1)],[50;250], 'g');
To make things generic, it is as if I did this:
cplxPlot(location)=plot(app.UIAxes,[cplxPlot(1);cplxPlot(1)],[50;250],'g');
This basically stores a bunch of vertical lines. I want to now delete the line with a certain x value. In the command line of matlab, I did this simple if loop to see if my first plot has the x value of 20, and it worked.
if length(find(cplx1Plot(1).XData==value,1,'first'))==1
disp('wow')
end
But, in app designer, the exact same code :
if length(find(app.cplx1Plot(1).XData==value,1,'first'))==1
app.Label.Text='wow'
end
would display the error: "Dot indexing is not supported for variables of this type." Can someone tell me what I am doing wrong? It worked perfectly in a matlab script, but not on app designer and I am not sure why.
Follow up: I just used the class function, and apparently my vector is storing doubles in app-designer, but it stores class in regular matlab... I have no idea why the elements in the vector would ever be a double.
Follow up 2.0: Apparently, if I access a property to store a line, it is stored as a double, but if I choose to make it a local variable instead, it would be a line. I need this to be a property/global variable and don't get why in the world it would ever be stored as a double...
For instances, bob stores doubles in this scenario :
bob(1)= plot([.005;.005],[100;200],'g')
app.Label.Text=string(class(bob(1)));
But, bob stores doubles in this:
app.bob(1)= plot([.005;.005],[100;200],'g')
app.Label.Text=string(class(app.bob(1)));
For context, I declared bob in my properties like this:
bob