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

边栏推荐
- oracle 控制文件的多路复用
- Exercise 1 simple training of R language drawing
- Display DIN 4102-1 Class B1 fire test requirements
- 【案例】元素的显示与隐藏的运用--元素遮罩
- Longest swing sequence [greedy practice]
- Five layer network protocol
- Kingbasees v8r3 data security case - audit record clearing case
- Ethereum ETH的奖励机制
- 100 cases of shell programming
- Sequence alignment
猜你喜欢

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

让开发效率飞速提升的跨端方案

Zhang Lijun: la pénétration de l’incertitude dépend de quatre « invariants»

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

2.2.5 basic sentences of R language drawing

Alibaba cloud award winning experience: build a highly available system with polardb-x

Influence of oscilloscope probe on signal source impedance

Golang (1) | from environmental preparation to quick start

Golang(1)|从环境准备到快速上手

Cold violence -- another perspective of objective function setting
随机推荐
Ethereum ETH的奖励机制
EN 438-7 laminated sheet products for building covering decoration - CE certification
The reason why the ncnn converted model on raspberry pie 4B always crashes when called
The primary key is set after the table is created, but auto increment is not set
Wood board ISO 5660-1 heat release rate mapping test
[case] Application of element display and hiding -- element mask
100 cases of shell programming
SQL knowledge leak detection
Feng Tang's "spring breeze is not as good as you" digital collection, logged into xirang on July 8!
张丽俊:穿透不确定性要靠四个“不变”
【案例】定位的运用-淘宝轮播图
使用Aspect制作全局异常处理类
Traps in the explode function in PHP
Teach yourself to train pytorch model to Caffe (2)
vant 源码解析 之深层 合并对象 深拷贝
EBS Oracle 11g 克隆步骤(单节点)
EasyExcel的读写操作
ESP32
Arcgis\qgis no plug-in loading (no offset) mapbox HD image map
xlrd常见操作