How can i make plot with different length vector?
16 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
hello please help me, i have matrix A = 195x1 and A1 = 17675x1, how can i make plot with these?
2 Commenti
Luna
il 16 Dic 2019
Can you explain it more specific? what do those arrays represent? What kind of plot do you want to see? (scatter plot, X-Y plot, histogram, etc.)
Risposte (2)
KSSV
il 16 Dic 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.
2 Commenti
ME
il 16 Dic 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);
plot(X,Y,X1,Y1)
If any of my assumptions about your data are incorrect then let us know and I'm sure me or somebody else can help.
0 Commenti
Vedere anche
Categorie
Scopri di più su Scatter Plots in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!