0
votes

I have a matrix called All( that contains 36 Rows *36 Columns ). Each row in the first column represents the data of a specific user.
For Example: ( Row 1, Col 1) is the data of user1 (Row 2, Col 1 ) is the data of user2 and so on ...

while the remaining columns of each row represent the data of other users.

Here is an example

        U1           U2         U3          U4           U5          U6          U7         U8         U9
U1  0.893843817 3.886552268 3.709749566 2.074159839 1.41454843  1.316844595 2.821212819 2.56227087  2.629203193

U2  4.274595589 0.717473414 1.852019347 4.120487919 3.643092522 3.910133537 3.653264918 3.768508546 3.600310216

U3  3.792746627 1.981976025 0.772897523 4.424817857 3.404691578 3.529035881 4.082263848 3.589005819 3.973794161

U4  2.272985295 3.991564734 4.349798953 1.108979094 2.125695585 2.175526333 2.195450565 2.659130011 2.214540212

U5  1.535948423 3.477225647 3.395365819 2.198238679 0.891922192 1.531664536 2.854381995 2.604555844 2.621943577

U6  1.473384159 3.796990782 3.500527772 2.28520245  1.641486616 1.007024168 2.776351266 2.193425349 2.503514153

U7   2.84216492 3.595656161 3.870369164 2.099876283 2.714722529 2.532759657 1.153694528 1.729400807 1.20805077

U8  2.862627179 3.723521796 3.67173322  2.540544223 2.674907673 2.317951738 1.631412652 1.01641249  1.417249982

U9  2.806327839 3.572943493 3.747666436 2.254327881 2.589086611 2.407241365 1.330037167 1.670615615 0.835811042

I'd like to draw the first column in the matrix with specific colour and shape and all the remaining column with another colour and shape in MATLAB or any other program that can do the purpose! .

The attached image is what I have done so far but I can't recognise the first column from other columns in the graph because all of them similar shape

enter image description here

1

1 Answers

0
votes

You can use the function hold to retain current plot when adding new plots.

So if you have a Matrix M:

plot(M(:,1),'r^'); %plot the first column with red triangles
hold on
plot(M(:,2:end),'bo') %plot the next value with blue cirlces

Result:

enter image description here

All the details about line specification can be found here