Info

此问题已关闭。 请重新打开它进行编辑或回答。

error in calculating mid point

2 次查看(过去 30 天)
kash
kash 2012-1-11
关闭: MATLAB Answer Bot 2021-8-20
i have a matrix
28 45781 5 0 0 13 31 77516 7 0 0 16 37 83311 9 0 0 40
i calculated mid point but i get error not getting exact result
F_mid = conv2(K, [0.5 0.5], 'valid')
k is my above matrix
the result i get is
F_mid =
1.0e+005 *
0.2290 0.2289 0.0000 0 0.0001
0.3877 0.3876 0.0000 0 0.0001
please help
  1 个评论
Walter Roberson
Walter Roberson 2012-1-11
Try switching to
format long g
I think the results will make more sense

回答(1 个)

Andrei Bobrov
Andrei Bobrov 2012-1-11
K = reshape([28 45781 5 0 0 13 31 77516 7 0 0 16 37 83311 9 0 0 40],6,[]).';
F_mid = conv2(K,[1 1;1 1]/4,'valid')
for you...
F_mid = conv2(K,[1;1]/2,'valid')

此问题已关闭。

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by