当前位置:网站首页>matlab绘制hsv色轮图
matlab绘制hsv色轮图
2022-07-05 21:35:00 【slandarer】
% 生成网格
tList=linspace(0,2.*pi,300);
rList=linspace(0,1,100);
[theta,R]=meshgrid(tList,rList);
% 角度及半径转换为坐标
X=cos(theta+pi).*R;
Y=sin(theta).*R;
Z=zeros(size(X));
% 构造hvs表(nx3)并转换为rgb表
thetaV=theta(:);RV=R(:);
hsvList=[thetaV./2./pi,ones(size(RV)),RV];
rgbList=hsv2rgb(hsvList);
% 将其变成矩阵三元组
C=zeros([size(X),3]);
C(:,:,1)=reshape(rgbList(:,1),size(X));
C(:,:,2)=reshape(rgbList(:,2),size(X));
C(:,:,3)=reshape(rgbList(:,3),size(X));
% surf绘图
surf(X,Y,Z,'EdgeColor','none','CData',C)
axis([-1,1,-1,1]);axis equal
view(0,90);

边栏推荐
- MySQL deep paging optimization with tens of millions of data, and online failure is rejected!
- Comprehensive optimization of event R & D workflow | Erda version 2.2 comes as "7"
- Advantages of robot framework
- R language [data management]
- 怎么利用Tensorflow2进行猫狗分类识别
- WPF gets the control in the datagridtemplatecolumn of the specified row and column in the DataGrid
- R语言【数据管理】
- Parker driver maintenance COMPAX controller maintenance cpx0200h
- 让开发效率飞速提升的跨端方案
- kingbaseES V8R3数据安全案例之---审计记录清除案例
猜你喜欢

使用Aspect制作全局异常处理类

Access Zadig self-test environment outside the cluster based on ingress controller (best practice)

Arcgis\qgis no plug-in loading (no offset) mapbox HD image map

leetcode:1755. Sum of subsequences closest to the target value

MMAP

R语言【数据管理】

PVC plastic sheets BS 476-6 determination of flame propagation properties

SQL knowledge leak detection

KingbaseES V8R3集群维护案例之---在线添加备库管理节点

MySQL 千万数据量深分页优化, 拒绝线上故障!
随机推荐
MySQL 千万数据量深分页优化, 拒绝线上故障!
SQL knowledge leak detection
SQL common syntax records
Li Kou ----- the maximum profit of operating Ferris wheel
办公遇到的问题--
EasyExcel的读写操作
Why can't Chinese software companies produce products? Abandon the Internet after 00; Open source high-performance API gateway component of station B | weekly email exclusive to VIP members of Menon w
思特奇加入openGauss开源社区,共同推动数据库产业生态发展
Four components of logger
股票开户选择哪家证券公司比较好哪家平台更安全
Chap2 steps into the palace of R language
Deep merge object deep copy of vant source code parsing
R language learning notes
Teach yourself to train pytorch model to Caffe (2)
Cold violence -- another perspective of objective function setting
面试官:并发编程实战会吗?(线程控制操作详解)
Realize the function of verifying whether the user has completed login when browsing the page
one hundred and twenty-three thousand four hundred and fifty-six
Robot framework setting variables
Haas506 2.0 development tutorial - Alibaba cloud OTA - PAC firmware upgrade (only supports versions above 2.2)