Dear All,
Code used:
figure; hold on; plot(fliplr(x1), fliplr(y1), 'ro'); plot(x8, y8, 'rx'); plot(fliplr(x2), fliplr(y2), 'bo'); plot(fliplr(x6), fliplr(y6), 'b*'); plot(x3, y3, 'mo'); plot(x7, y7, 'mx'); plot(x4, y4, 'co'); plot(fliplr(x5), fliplr(y5), 'c*');
Note: 1. Some of the values are NaN, 2. some of coordinate are clashes with each other. I would like to combine all 8 graphs into one graph(2 arrays Xtotal and Ytotal), how can I do it?
I could use following code to find all unique values:
xall = [fliplr(x1) fliplr(x2) x3 x4 fliplr(x5) fliplr(x6) x7 x8]; [x, ~, xindices] = unique(xall); yall = [fliplr(y1) fliplr(y2) y3 y4 fliplr(y5) fliplr(y6) y7 y8]; [y, ~, yindices] = unique(yall);>> x<1x102 double> = [258 259 ... 353 NaN]>> y<1x189 double> = [177 178 ... 306 NaN]
But I'm not sure how I can use it, and what to do next. Also I would like to keep all NaN in the same place, if possible.
Thanks in advance for any help,
I
Best Answer