当前位置:网站首页>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);

边栏推荐
- Ethereum ETH的奖励机制
- @Validated基础参数校验、分组参数验证和嵌套参数验证
- selenium 查找b或p标签的内容
- Oracle HugePages没有被使用导致服务器很卡的解决方法
- 事项研发工作流全面优化|Erda 2.2 版本如“七”而至
- PostGIS installation geographic information extension
- leetcode:1755. Sum of subsequences closest to the target value
- Summary of data analysis steps
- Emotional analysis of wechat chat records on Valentine's day based on Text Mining
- 【日常训练】729. 我的日程安排表 I
猜你喜欢

Haas506 2.0 development tutorial - Alibaba cloud OTA - PAC firmware upgrade (only supports versions above 2.2)

Teach yourself to train pytorch model to Caffe (III)

Parker driver maintenance COMPAX controller maintenance cpx0200h

Influence of oscilloscope probe on signal source impedance

Some common processing problems of structural equation model Amos software

阿里云有奖体验:用PolarDB-X搭建一个高可用系统

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

Incentive mechanism of Ethereum eth

How to prepare for the algorithm interview and answer the algorithm interview questions

R语言【数据管理】
随机推荐
EN 438-7 laminated sheet products for building covering decoration - CE certification
Pytoch practice -- MNIST dataset handwritten digit recognition
SQL knowledge leak detection
Chap2 steps into the palace of R language
SYSTEMd resolved enable debug log
EasyExcel的读写操作
ESP32
uni-app 蓝牙通信
Summary of data analysis steps
selenium 获取dom内属性值的方法
Four components of logger
vant 源码解析之 utils/index.ts 工具函数
张丽俊:穿透不确定性要靠四个“不变”
Vant source code parsing event Detailed explanation of TS event processing global function addeventlistener
Opérations de lecture et d'écriture pour easyexcel
Traps in the explode function in PHP
Which securities company is better and which platform is safer for stock account opening
xlrd常见操作
js常用方法封装
Aitm2-0002 12s or 60s vertical combustion test