How can i extrat some value by a plot?
조회 수: 1 (최근 30일)
이전 댓글 표시
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
채택된 답변
Voss
2022년 7월 15일
편집: Voss
2022년 7월 15일
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
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!