필터 지우기
필터 지우기

purpose of daspect in matlab

조회 수: 9 (최근 30일)
Sara AR
Sara AR 2019년 11월 25일
답변: Payas Bahade 2019년 11월 28일
I am trying to figure out why do we use the daspect. I use daspct[1,1,1] and i know it for equal data unit lengths in all directions, but what is the purpose of that?

답변 (1개)

Payas Bahade
Payas Bahade 2019년 11월 28일
Hi Sara,
Function ‘daspect’ is used to control the data unit length along each axis. This can help to better visualizing data.
In 3-D scatter chart example given below, setting daspect([1 1 1]) helps better visualize plotted data by making it less cluttered.
X = rand(100,1);
Y = rand(100,1);
Z = rand(100,1);
scatter3(X,Y,Z)
daspect([3 2 1])
Output :
Capture1.PNG
Output with daspect([1 1 1]) :
Capture2.PNG
Also, ‘daspect’disables the ‘stretch-to-fill’ behavior of plot i.e. resizing of plot window doesn’t change data axis aspect ratio so that there is no distortion in plotted data.
For detailed information on ‘daspect’, please refer this documentation link.
Hope this helps!

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by