Matrix Maniplation: Removing a smaller matix from a larger matrix.

조회 수: 1 (최근 30일)
Jack
Jack 2015년 3월 18일
답변: Guillaume 2015년 3월 18일
Hi,
Say I have 2 matrices:
a=[1 2 3 4; 5 6 7 8; 9 10 11 12; 13 14 15 16];
b=[6 7; 10 11];
How could I remove b from a to create c. In the same way if a was a 36x3 matrix and b was a 16x3 matrix of any numbers I could remove the values of b from a to create c (20x3 matrix).
Thanks
  댓글 수: 3
Jack
Jack 2015년 3월 18일
편집: Jack 2015년 3월 18일
Yes, is there anyway of doing this?
as in if I have a matrix 36x3 say and a matrix of 16x3 this 16x3 matrix is inside the 36x3 matrix. How do I remove it to obtain a 20x3 matrix?
Thanks.
Guillaume
Guillaume 2015년 3월 18일
Yes to what? Note that I've put some questions mark in my c since I've no idea what you want.
I have no idea what sort of 20x3 matrix you're hoping to get. If you remove a square from a bigger square, you're left with a square with a hole, not a smaller square.

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

답변 (1개)

Guillaume
Guillaume 2015년 3월 18일
See this file exchange submission for finding your b within your a.
I have no idea what sort of c you're trying to obtain.

카테고리

Help CenterFile Exchange에서 Shifting and Sorting Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by