this is my question:
A={[1 2 3]; [1] ; [5 1]};
Now I want to convert this variable into a matrix, like this:
[B]=functionX(A)
B= [1 2 3;
1 NaN NaN;
5 1 NaN];
Once the first question is solved, I wanna plot this matrix, so I have to do this (I don't know if there is a more simple way to do it):
figure;hold on
for i=1:size(B)
plot(B(i,:),'o')
end
And then I get this graphic:
So, I was wondering if maybe there is a way to make that matlab recognize just one data, I mean, only appears in the legend "data 1" instead "data 1, data 2 and data 3".