필터 지우기
필터 지우기

camera view angle function in Matlab

조회 수: 5 (최근 30일)
sophia
sophia 2013년 1월 23일
답변: Nathan Ellingson 2019년 2월 20일
I know that in matlab the camera view angle can be manipulated to be used as "zoom" function. The smaller the view angle, the more the image is magnified. Right now what I want to do is when the viewing angle is bigger, the image should be magnified. camva function could not be used as it is the opposite of what I want to do. Is there any way to do this in Matlab GUI?

답변 (1개)

Nathan Ellingson
Nathan Ellingson 2019년 2월 20일
Not 100% sure I understand. The camera view angle will always "zoom" in when it is as you shrink it.
I think what you might be trying to do is when you resize your figure (and by extention expand your camera view angle) you want to zoom in instead of showing more.
This can be accomplished by setting the "SizeChangedFcn" of your figure the plot is in, to set the camera view angle to be the same as you zoom in or out.
Just a rough idea of what you may want to do, obviously this will only zoom in as you expand or contract, and once you set camva to be negitive it will go back to the default, but hope this is a good start:
f = figure;
surf(peaks)
f.SizeChangedFcn = @(~,~) camva(camva-0.1);

카테고리

Help CenterFile Exchange에서 Camera Views에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by