Problem with "view" to save the orientation of a plot and then use it for another
显示 更早的评论
Hi, I'm trying to save the position of a plot in a subplot in order to plot the next with the same orientation (the code was performed already)
I tried with : orientation = view; % Its output is a 4 by 4 matrix. and then: view(orientation)
but I have an error in the second line I wrote: "Error using ==> view>ViewCore Argument must be scalar, or two-vector"
Could you help me, please?
采纳的回答
更多回答(2 个)
rjarvinen
2012-3-5
0 个投票
Is there a way to store all camera settings in a variable and re-use them in several plots? Does the 4-by-4 matrix returned by the view function include all the camera and view information?
What I have done is to manually adjust the camera and view properties in the GUI for a single 3-D plot. Now I would like to save this configuration for easy later use to avoid doing this again for other similar plots.
view([az el]) is not enough since it does not include all the camera properties a user can adjust in the GUI.
Anton
2012-3-20
very stupid to take away this backward compatibility! I had a script where the 4-by-4 matrix was stored in a variable A and the figure rotated with view(A) - fortunately it was always the same matrix (constant) and I simply changed the line to view(-46,44) to have an appropriate 3D-like view of my figure.
A= 1.0e+04*[ 0.4496 -0.4782 0.0000 0.0143
0.3244 0.2981 0.0000 -0.3113
0.3587 0.3298 -0.0000 4.2989
0 0 0 0.0001];
May be there is a simple way to transform this 4x4 matrix to the two angles, but it is very strange that 16 values were used instead of 2 befor and that there is no way to use this matrix directly now (you can still generate it with A=view)
类别
在 帮助中心 和 File Exchange 中查找有关 MATLAB Support Package for USB Webcams 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!