필터 지우기
필터 지우기

MATLAB object only shows on plot if greater than certain value found in matrix

조회 수: 1 (최근 30일)
I have code that plots the objects in a 3D scatter graph. Some objects move, so I have a color scale to show which ones move further than the others. Is there a way I can only show the objects that have moved a certain distance, and ignore the ones that haven't (i.e. they don't show up on plot)? Note: The c-axis is based on total displacement which is found in the 6th column. So I want to check this value for each object for each time step. If it is greater than 2.863, the object shows up. If it is not greater than 2.863, it does not show up.
This is the code that I have written:
filename= 'testing.gif'
FigHandle = figure('Position', [50, -30, 1000, 800]);
for i=1:1001
s=1;
scatter3(am.data(:,3,i),am.data(:,4,i),am.data(:,5,i),s,am.data(:,6,i))
colorbar
caxis([0,2.863])
% axis([0 50 0 50 0 40]);
T(i)=getframe
end

답변 (0개)

카테고리

Help CenterFile Exchange에서 Graphics Object Properties에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by