MATLAB MATLAB: Help with desired color in patch command?

  • Thread starter Thread starter hivesaeed4
  • Start date Start date
  • Tags Tags
    Color Matlab
AI Thread Summary
The discussion revolves around using the patch command in MATLAB to create a boundary wall, specifically addressing issues with color customization. The user is experiencing difficulties in setting the desired color, which should be black, as the output is not reflecting the RGB color chart correctly. A response highlights that the user mistakenly set the color to red instead of black, clarifying the correct RGB values: [1 0 0] for red and [0 0 0] for black. The conversation emphasizes the importance of accurately specifying RGB values in MATLAB for achieving the desired color in graphical outputs.
hivesaeed4
Messages
217
Reaction score
0
Hi,
I'm trying to make a boundary wall using the patch command for a project. Trouble is while the boundary wall is alright, it's color is'nt what I desired and for some reason the patch command is'nt following the rgb color chart despite what the help on MATLAB says. I want it to be black. Could someone tell me what mistake I'm making in my code, and tell me how to get any desired color using the patch command?

Attsached are the screen shots of my code as well as the resulting boundary wall.
 

Attachments

  • code.jpg
    code.jpg
    22.4 KB · Views: 512
  • resulting boundary wall.jpg
    resulting boundary wall.jpg
    28.6 KB · Views: 570
Physics news on Phys.org
Not sure if you figured out your problem yet, but you set the color to red instead of black

[1 0 0] = Red
[0 0 0] = Black
 

Similar threads

Replies
4
Views
2K
Replies
12
Views
2K
Replies
12
Views
3K
Replies
5
Views
8K
Replies
1
Views
2K
Replies
4
Views
2K
Back
Top