当前位置:网站首页>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);
边栏推荐
- Kingbasees v8r3 cluster maintenance case -- online addition of standby database management node
- Chapter 05_ Storage engine
- Four components of logger
- Sequence alignment
- MySQL deep paging optimization with tens of millions of data, and online failure is rejected!
- Aitm2-0002 12s or 60s vertical combustion test
- Realize the function of verifying whether the user has completed login when browsing the page
- KingbaseES V8R3集群维护案例之---在线添加备库管理节点
- vant 源码解析之 utils/index.ts 工具函数
- 【案例】元素的显示与隐藏的运用--元素遮罩
猜你喜欢
R语言【数据管理】
让开发效率飞速提升的跨端方案
MySQL deep paging optimization with tens of millions of data, and online failure is rejected!
Incentive mechanism of Ethereum eth
Kingbasees v8r3 cluster maintenance case -- online addition of standby database management node
R language [data management]
Chapter 05_ Storage engine
Emotional analysis of wechat chat records on Valentine's day based on Text Mining
Uni app Bluetooth communication
Comprehensive optimization of event R & D workflow | Erda version 2.2 comes as "7"
随机推荐
DBeaver同时执行多条insert into报错处理
Environment configuration problem record
股票开户选择哪家证券公司比较好哪家平台更安全
Robot framework setting variables
Opérations de lecture et d'écriture pour easyexcel
张丽俊:穿透不确定性要靠四个“不变”
[case] Application of element display and hiding -- element mask
@Validated basic parameter verification, grouping parameter verification and nested parameter verification
oracle 控制文件的多路复用
postgis 安装地理信息扩展
校招期间 准备面试算法岗位 该怎么做?
"Grain mall" -- Summary and induction
Clickhouse copy paste multi line SQL statement error
【日常训练--腾讯精选50】89. 格雷编码(看题解才会的)
R language learning notes
Realize the function of verifying whether the user has completed login when browsing the page
有些事情让感情无处安放
Feng Tang's "spring breeze is not as good as you" digital collection, logged into xirang on July 8!
Cross end solution to improve development efficiency rapidly
postgres 建立连接并删除记录