I am trying to plot multiple plots on a common x-axis. The problem that I am facing is that the size of my data sets (data1, and data2) are different from each other. Also, the length of the data to be used for x-axis is same as data2, but not data1.
This is resulting into the following error:
Index exceeds the number of array elements (683898).
Error in Plot_code
y1 = y1(dum)
[x, dum] = sort(x);
y1 = y1(dum);
[x, dum2] = sort(x);
y2 = y2(dum2);
Any suggestion to resolve this error would be highly appreciated.