How can i make plot with different length vector?
14 views (last 30 days)
KSSV on 16 Dec 2019
To plot, you are supposed to have dimensions of X and Y equal. Read about interp1. You can do inteprolation and get both the arrays to same dimension.
ME on 16 Dec 2019
My guess here is that your two arrays (A and A1) represent your Y data. In that case you could simply create two different sized arrays containing the X data. For example, if the two data sets covered the same X range and assuming the points are equally spaced then you could do something like:
X = linspace(minX, maxX, 195);
X1 = linspace(minX, maxX, 17657);
If any of my assumptions about your data are incorrect then let us know and I'm sure me or somebody else can help.