Change 3D view in matlab
matlab
Solution
Try using `view`. I don't have MATLAB available so I can't test it, but I think it can do what you want.
Example from the documentation:
Set the view along the y-axis, with the x-axis extending horizontally and the z-axis extending vertically in the figure.
view([0 0]);
EDIT:
Try using three inputs to the `view` function. I can't experiment myself, but you should be able to do it if you choose the right values here.
From documentation:
`view([x,y,z])` sets the view direction to the Cartesian coordinates x, y, and z. The magnitude of (x,y,z) is ignored.
EDIT 2:
Check out `camroll`. I think `camroll(90)` (possibly in combination with `view`) will work.
From documentation:
`camroll(dtheta)` rotates the camera around the camera viewing axis by the amounts specified in dtheta (in degrees). The viewing axis is the line passing through the camera position and the camera target.
Problem
I would like to change the view of a 3D plot in matlab such that the `y`-axis points upward and the `z`-axis points to left. For example, consider the following plot: Here the `x`-axis points forward, the `y`-axis points to the right and the `z`-axis points upward. I would like to have the `y`-axis points upward and the `z`-axis points to the left instead. I tried to rotate the plot (using the figure window toolbar rotate button) but I could not get it to work. (It should just be a simple 90 degrees rotation about the `x`-axis) Code to generate the plot: ``` membrane view(100,50) xlabel('x-axis'); ylabel('y-axis'); zlabel('z-axis'); grid on ```