selecting mid points
13 次查看(过去 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!