How can i extrat some value by a plot?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
I have 2 vectors forming a plot
MA=[0.763 0.724 0.822 0.839 0.957 1.000 0.963 0.911 0.583 0.480 0.424 0.490];
Month=[1 2 3 4 5 6 7 8 9 10 11 12];
plot(Month,MonthC_A)
The plot is made be a continuos line that connect 2 succesive value of MA divided of a space 1 (space between of Month elements).
I would like to get a vetor X=[1x48] wich has as elemts, 4 values between each interval of space 1.
For example the first 2 elements of MA are 0.763 and 0.724 and and in the plot are the matching value of 1 and 2 on the x axis, i would like to obtain the value of 1, 1.25, 1.5, 1.75, 2
0 Commenti
Risposta accettata
Voss
il 15 Lug 2022
Modificato: Voss
il 15 Lug 2022
MonthC_A=[0.763 0.724 0.822 0.839 0.957 1.000 0.963 0.911 0.583 0.480 0.424 0.490];
Month=[1 2 3 4 5 6 7 8 9 10 11 12];
plot(Month,MonthC_A)
Month_interp = linspace(Month(1),Month(end),4*(numel(Month)-1)+1)
MonthC_A_interp = interp1(Month,MonthC_A,Month_interp)
hold on
plot(Month_interp,MonthC_A_interp,'r.')
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su 2-D and 3-D 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!