str2rgb
버전 1.0.0.0 (1.72 KB) 작성자:
Kenneth Eaton
Converts a string representation of a color to an RGB triple
A simple utility to convert a ColorSpec value, represented as a string, to a numeric RGB triple. This function does not use eval. One possible use is for reading a user-entered color value from an editable text box.
Examples:
str2rgb('yellow') returns [1 1 0]
str2rgb('y') returns [1 1 0]
str2rgb('[1 1 0]') returns [1 1 0]
str2rgb('1 1 0') returns [1 1 0]
str2rgb('[1; 1; 0]') returns [1 1 0]
str2rgb('[0 0.5 0.91]') returns [0 0.5000 0.9100]
str2rgb('purple') returns NaN
str2rgb('[1 2]') returns NaN
인용 양식
Kenneth Eaton (2026). str2rgb (https://kr.mathworks.com/matlabcentral/fileexchange/19432-str2rgb), MATLAB Central File Exchange. 검색 날짜: .
MATLAB 릴리스 호환 정보
개발 환경:
R14SP3
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux카테고리
Help Center 및 MATLAB Answers에서 Characters and Strings에 대해 자세히 알아보기
태그
도움
| 버전 | 게시됨 | 릴리스 정보 | |
|---|---|---|---|
| 1.0.0.0 |
