How can i plot this pic by matlab ??
조회 수: 1 (최근 30일)
이전 댓글 표시
답변 (1개)
DGM
2025년 4월 6일
It looks like an upside-down representation of HSV with some random unknown extra line. I'm going to ignore it, since it looks like a mistake.
% vertex colors
CT0 = [0 0 0; % k
1 1 1; % w
hsv(6)]; % rygcbm
% vertex locations
a = 0.5;
b = sqrt(3)/2;
V = [0 0 1; % k
0 0 0; % w
1 0 0; % r
a b 0; % y
-a b 0; % g
-1 0 0; % c
-a -b 0; % b
a -b 0]; % m
% face list
ps = (3:8).';
F = [2*ones(6,1) circshift(ps,-1) ps;
ones(6,1) ps circshift(ps,-1)];
% plot it all
patch('faces',F,'vertices',V, ...
'facevertexcdata',CT0,'facecolor','interp');
view(-62,-22)
axis equal; grid on
xlabel('X'); ylabel('Y'); zlabel('Z')
ylim([-1 1])
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!