ax = axes.
When you do that in MATLAB, for example...
plot(1:5)
>> ax = axes
ax =
Axes with properties:
XLim: [0 1]
YLim: [0 1]
XScale: 'linear'
YScale: 'linear'
GridLineStyle: '-'
Position: [0.1300 0.1100 0.7750 0.8150]
Units: 'normalized'
Show all properties
As you can see, the result is a handle to the axes in a figure.
Then later on, you did this:
xlim(ax, [-.8, .8]); ylim(ax, [-.8, .8]); zlim([ax, maxDepth]);
Do you see that in the calls to xlim and ylim, you used one form, yet when you called ylim, for some reason, you did something completely different?
In fact, inside the call to zlim, you tried to catenate the number 5 to a graphics handle?
maxDepth = 5;
Now, go back and READ THE ERROR MESSAGE YOU GOT. maxdepth is the number 5.
Need a Custom Version or Complete Simulation for This Problem?
Our 500+ PhD engineers build, debug, and optimize working MATLAB scripts and Simulink (.slx) models tailored to your exact assignment rubrics with zero plagiarism.
Explore similar technical troubleshooting questions and verified MATLAB solutions: