MATLAB: Help with desired color in patch command?

  • Context: MATLAB 
  • Thread starter Thread starter hivesaeed4
  • Start date Start date
  • Tags Tags
    Color Matlab
Click For Summary
SUMMARY

The discussion centers on using the MATLAB patch command to create a boundary wall with a specific color. The user initially set the color to red using the RGB value [1 0 0] instead of the desired black color, which is represented by the RGB value [0 0 0]. The conversation highlights the importance of correctly specifying RGB values in MATLAB to achieve the intended color output in graphical representations.

PREREQUISITES
  • Familiarity with MATLAB programming environment
  • Understanding of RGB color model
  • Knowledge of the patch command in MATLAB
  • Basic skills in graphical representation in MATLAB
NEXT STEPS
  • Research how to use the patch command in MATLAB for color customization
  • Learn about RGB color specifications in MATLAB
  • Explore MATLAB's graphical properties and their manipulation
  • Investigate troubleshooting techniques for color rendering issues in MATLAB
USEFUL FOR

This discussion is beneficial for MATLAB users, graphic designers, and engineers working on visualization projects who need to accurately implement color specifications in their 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: 530
  • resulting boundary wall.jpg
    resulting boundary wall.jpg
    28.6 KB · Views: 589
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 ·
Replies
4
Views
2K
Replies
6
Views
4K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 5 ·
Replies
5
Views
9K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 6 ·
Replies
6
Views
2K