Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- num = 64;
- v = linspace(-1,1,num);
- if true
- h = linspace(2/3,0,num)';
- clr = hsv2rgb([h ones(num,2)]);
- else
- clr = flipud(hsv(num));
- end
- figure
- subplot(4,1,1), imagesc(v), colormap(clr), axis off, title('hsv')
- subplot(4,1,2:4), h = plot(v,clr); axis tight
- set(h(1), 'Color','r', 'LineWidth',3)
- set(h(2), 'Color','g', 'LineWidth',3)
- set(h(3), 'Color','b', 'LineWidth',3)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement