camlookat
Aim the camera at an object.
📝Syntax
camlookat
camlookat(obj)
camlookat(ax)
📥Input Arguments
Parameter Description
obj a graphics object to look at (for example a surface or line).
ax an axes whose contents are framed.
📄Description

camlookat sets the camera target to the center of the object and moves the camera along the current viewing direction so the object fills the view. With no argument it frames the current axes.

💡Examples
f = figure();
[x, y, z] = sphere(20);
s = surf(x + 5, y - 3, z);
axis equal;
camlookat(s);
🔗See Also
camtargetcampos
🕔Version History
Version Description
2.0.0 initial version
Edit this page on GitHub