I would like to plot multiple lines on the same graph in matlab. I cant't find the easiest way to do it. At the moment I have something like this:
for j=1:n
plot(j,total,'*')
hold on
end
total changes in each iteration as well as j. This will make the plot I want but with the '*' instead of lines. I would like to join these asterisk with a line for each colour. Keep in mind that total is a vector with length k, thus in each iteration i have k asterisks.
For example:
iteration 1: j=1, total= [ 0.2000 0.6000 0.2000]'
iteration 2: j=2, total= [0.1000 0.6000 0.3000]'
iteration 3: j=3, total= [0.2095 0.4476 0.3429]'
X-axis is 1,2,3 and Y-axis should have 0.2,0.1,0.2095 connected with a line and an asterisks at these points, 0.6,0.6,0.4476 connected with a different colour line and asterisk etc.