필터 지우기
필터 지우기

Re-grid the matrix.

조회 수: 2 (최근 30일)
Pritha Pande
Pritha Pande 2017년 5월 19일
댓글: Pritha Pande 2017년 5월 19일
I have data with resolution 0.625*0.5. I want to re-grid the matrix such that it becomes 0.5*0.5. Below is the code I am currently writing to re-grid the matrix. [x,y]=meshgrid(1:0.628:50.8,1:0.628:50.8); apr98=interp2(trans_apr98,x,y,'spline');
Help me to improve this code, as the regridded data i am getting with above code is not correct

채택된 답변

Image Analyst
Image Analyst 2017년 5월 19일
You could use imresize(), if you have the Image Processing Toolbox.
[rows, columns] = size(trans_apr98); % Get current size of matrix.
newRows = round(rows * 0.625/0.5); % More rows for increased/finer resolution
apr98 = imresize(trans_apr98, [newRows, columns]); % Resize the matrix.
  댓글 수: 1
Pritha Pande
Pritha Pande 2017년 5월 19일
Thank you. It worked.

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

추가 답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by