필터 지우기
필터 지우기

How to trim data in a matrix?

조회 수: 85 (최근 30일)
flemingtb
flemingtb 2018년 9월 12일
편집: jonas 2018년 9월 12일
I have a matrix 800x800, from X(0:130) and X(589:end) is garbage. How do i remove the data so that i can surface plot it?
If there is a link on how to manipulate data in MATLAB i'd appreciate it, it seems i spend most of my time goofing around with this type of stuff. Any help is greatly appreciated.
  댓글 수: 1
Rik
Rik 2018년 9월 12일
You mean like this?
X_smaller=X(131:588,131:588);

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

채택된 답변

jonas
jonas 2018년 9월 12일
편집: jonas 2018년 9월 12일
X(0) is not a valid index. Try this:
X(:,[1:130,589:end])=[];
This removes the columns from 1 to 130 and 589 onward, so that you end up with a matrix of size ~800x450,
You could have a read here ( link )

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by