How to create a convolution matrix?
조회 수: 8 (최근 30일)
이전 댓글 표시
Hello all,
I have a matrix like this
a=[1 2 3]
For convolution I reversed the matrix a=[3 2 1]
Then, to multiply this matrix with another matrix, I should shift the and get like this one
M=[1 0 0; 2 1 0; 3 2 1; 0 3 2; 0 0 3;]
How can I get this matrix ? Please help...
댓글 수: 0
답변 (2개)
Image Analyst
2014년 4월 13일
A for loop, and fliplr() and circshift() should get it for you. Give it a try first - it will be a good learning experience. It's not hard. Come back if it's too hard for you and you really really need us to do it 100% for you and it's not homework.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!