Bird
0
0

What will be the color and style of the line plotted by this command?

medium📝 Predict Output Q13 of 15
MATLAB - 2D Plotting
What will be the color and style of the line plotted by this command?
plot(x, y, 'g:*')
AGreen dotted line with star markers
BGreen solid line with star markers
CGreen dash-dot line with star markers
DGreen dashed line with star markers
Step-by-Step Solution
Solution:
  1. Step 1: Decode the plot style string 'g:*'

    'g' means green color, ':' means dotted line style, and '*' means star markers.
  2. Step 2: Combine the meanings

    The line will be green, dotted, with star markers.
  3. Final Answer:

    Green dotted line with star markers -> Option A
  4. Quick Check:

    Color = green, line style = dotted, marker = star [OK]
Quick Trick: ':' means dotted line, '*' means star marker [OK]
Common Mistakes:
  • Confusing ':' with dash-dot line
  • Mixing marker and line style symbols
  • Assuming solid line by default

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More MATLAB Quizzes