Hi have this code:
resRGB = HSVtoRGB(resHSV);
but i have this error:
Input error: please pass as input a vector variable with 3 elements with value in the range [0,1]
How do I have improve my code?

답변 (1개)

yanqi liu
yanqi liu 2022년 2월 26일

0 개 추천

yes,may be check the resHSV value,such as
resHSV = rand(10, 3)
resHSV = 10×3
0.7587 0.7579 0.0652 0.4818 0.0649 0.8844 0.0645 0.1354 0.6241 0.3727 0.3020 0.4130 0.3200 0.7897 0.9591 0.1881 0.8734 0.0345 0.5663 0.9280 0.7975 0.1788 0.2104 0.1991 0.9820 0.2493 0.1922 0.7460 0.6177 0.9019
size(resHSV)
ans = 1×2
10 3
rgb = hsv2rgb(hsv);
surf(peaks);
colormap(rgb);
colorbar

카테고리

도움말 센터File Exchange에서 Color and Styling에 대해 자세히 알아보기

질문:

2022년 2월 25일

답변:

2022년 2월 26일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by