Q:

Create a simple plot and store the handle in a variable. Use the three different methods (dot notation, set, and structure) to change the Color property

0

Create a simple plot and store the handle in a variable. Use the three different methods (dot notation, set, and structure) to change the Color property.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

>> x = -pi:0.01:2*pi;

>> y = sin(x);

>> ph = plot(x,y,'r*')

ph = 

 Line with properties:

 Color: [1 0 0]

 LineStyle: 'none'

 LineWidth: 0.5000

 Marker: '*'

 MarkerSize: 6

 MarkerFaceColor: 'none'

 XData: [1x943 double]

 YData: [1x943 double]

 ZData: [1x0 double]

 Show all properties

>> set(ph,'Color','g')

>> ph.Color = [1 1 0];

>> fstruct = get(ph) % to see Color only

fstruct = 

 Color: [1 1 0]

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now