how to plot stem plot for two different vectors (with different colors) in matlab

main.m
x = 1:10;
y1 = [1 2 3 4 5 6 7 8 9 10];
y2 = [10 9 8 7 6 5 4 3 2 1];

figure
hold on
stem(x, y1, 'b')
stem(x, y2, 'r')
hold off
127 chars
10 lines

related categories

gistlibby LogSnag