Hello ....
I want help in deleting odd rows and coloumns from an image and at the same time even rows and even coloumns from an image.

댓글 수: 1

Guillaume
Guillaume 2015년 4월 29일
Your question is not clear. If you delete odd and even rows at the same time, then you're left with nothing.

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

답변 (1개)

Guillaume
Guillaume 2015년 4월 29일

0 개 추천

This is very basic matrix indexing. To delete odd rows:
m(1:2:end, :) = []
To delete even columns:
m(:, 2:2:end) = []
Note that you can't do both at once. If you want to delete both odd rows and columns, you have to do it in two steps:
m(1:2:end, :) = []; %delete odd rows
m(:, 1:2:end) = []; %delete odd columns

카테고리

도움말 센터File Exchange에서 MATLAB에 대해 자세히 알아보기

태그

질문:

JAM
2015년 4월 29일

답변:

2015년 4월 29일

Community Treasure Hunt

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

Start Hunting!

Translated by