edited-error in calculating mid point

조회 수: 5 (최근 30일)
kash
kash 2012년 1월 11일
Sorry my matrix is
28 45781 5 0 0 13
31 77516 7 0 0 16
37 83311 9 0 0 40
in my previous post i did not edit give the matrix form correctly
please help
  댓글 수: 1
Walter Roberson
Walter Roberson 2012년 1월 11일
Duplicate is at http://www.mathworks.com/matlabcentral/answers/25842-error-in-calculating-mid-point

댓글을 달려면 로그인하십시오.

채택된 답변

Andrei Bobrov
Andrei Bobrov 2012년 1월 11일
K = [28 45781 5 0 0 13
31 77516 7 0 0 16
37 83311 9 0 0 40];
F_mid1 = conv2(K,[1 1;1 1]/4,'valid')
OR
F_mid2 = conv2(K,[1 1]/2,'valid')
OR
F_mid3 = conv2(K,[1; 1]/2,'valid')
Choose your variant!
  댓글 수: 7
kash
kash 2012년 1월 11일
thanks a lot andrei
Walter Roberson
Walter Roberson 2012년 1월 11일
I had proposed that 2 days before in http://www.mathworks.com/matlabcentral/answers/25618-error-using-conv
"If you want 2D convolution, then use a 2D convolution function such as conv2(), probably with [0.5 0.5].' as your kernel"
Notice that [0.5 0.5].' is [0.5; 0.5]

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by