selecting mid points
조회 수: 8 (최근 30일)
이전 댓글 표시
I have a values
F=[3 5 6 15 17 21 35 45 46 51 56 57 66 70 71 ]
now i want to calculate the mid points that is
i have to take 2 values that is(3,5)and (5,6) cal mid point(4,5.5)
next (5,6),(6,15) mid point is(5.5,10.5)
(6,15)and(15,17) mid point(10.5,16)
(15,17)and(17,21) mid point is(16,19)
and so on
please help
댓글 수: 0
채택된 답변
Image Analyst
2012년 1월 7일
Use convolution (a sliding window filter), conv():
F=[3 5 6 15 17 21 35 45 46 51 56 57 66 70 71 ]
F_mid = conv(F, [0.5 0.5], 'valid')
Results:
F =
3 5 6 15 17 21 35 45 46 51 56 57 66 70 71
f_mid =
Columns 1 through 12
4.0000 5.5000 10.5000 16.0000 19.0000 28.0000 40.0000 45.5000 48.5000 53.5000 56.5000 61.5000
Columns 13 through 14
68.0000 70.5000
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!