필터 지우기
필터 지우기

Trouble implementing the color orange to a function of a segment

조회 수: 1 (최근 30일)
Luc
Luc 2023년 4월 29일
답변: Piyush Dubey 2023년 5월 2일
Trying to make a snowman for my Engineering class final project and couldn't figure out how to get the color orange for the carrot nose. I used this code:
segment([25 10 25], [25 5 25], 5, true, y)
to make sure that it was the correct segment I wanted but when I tried implemented the hexadecimal code "#FF8800" in for "y" it was saying there was a matrix error or something with there being a formatting error. I tried other ways to implement the color but couldn't find anything that worked.
  댓글 수: 2
DGM
DGM 2023년 4월 29일
I don't know of any MATLAB functions called segment() that pertain to drawing. What function are you using and in what context?
FWIW, #FF8800 is [255 136 0]/255 in unit-scale decimal, which is what most MATLAB tools expect when given a color tuple.
Walter Roberson
Walter Roberson 2023년 4월 29일
Those do not appear to be valid inputs for segment (System Identification) or segment (Statistics and Machine Learning

댓글을 달려면 로그인하십시오.

답변 (1개)

Piyush Dubey
Piyush Dubey 2023년 5월 2일
Hi,
The valid input format for the segment() function and demonstration can be found in the following documentation:
Alternatively, you may try out the fill() function or fill3() function which is used to fill colored patches in 2D and 3D respectively. The usage of these functions and various options available are explained in the following links:
Hope this helps!

카테고리

Help CenterFile Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

태그

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by