赞
踩
这是我们在kWave工具箱中使用的resize函数。
function mat_rs = resize(varargin)
%RESIZE Resize a matrix.
% DESCRIPTION:
% Resize a matrix to a given size using interp2 (2D) or interp3
% (3D).
% Use interpolation to redivide the [0,1] interval into Nx, Ny, Nz
% voxels, where 0 is the center of first voxel, and 1 is the center
% of the last one.
%
% USAGE:
% mat_rs = resize(mat, new_size)
% mat_rs = resize(mat, new_size, interp_mode)
%
% INPUTS:
% mat - matrix to resize
% new_size - desired matrix size in elements given by [Nx, Ny] in
% 2D and [Nx, Ny, Nz] in 3D. Here Nx is the number of
% elements in the row direction, Ny is the number of
% elements in the column direction, and Nz is the
% number of elements in the depth direction.
%
% OPTIONAL INPUTS:
%
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。