sortMatrix

버전 1.0.1 (2.09 KB) 작성자: Christian Ballesteros
Sort input matrix (radpat) according to new axis definition
다운로드 수: 3
업데이트 날짜: 2020/10/7

라이선스 보기

Sort values in a matrix, each dimension corresponding to an axis in space, when the definition of one axis is redefined.

Example:
th = 0:180; % Theta angles from 0 to 180 deg
ph = 0:359; % Phi angles from 0 to 359
[P,T] = meshgrid(ph,th);

rPat = sind(T).*cosd(P);

% From [theta,phi] to [elevation,azimuth]
% Azimuth in -180...180 range, elevation in -90...90 range
idx = logical(ph>180);
az = ph;
az(idx) = ph(idx) - 360;
el = 90-th;

[rPatAz, azSort] = sortMatrix(rPat,az,2);
[rPatAzEl,elSort] = sortMatrix(rPatAz,el,1);

[A,E] = meshgrid(azSort,elSort);

figure;
pcolor(A,E,rPatAzEl); shading interp;

인용 양식

Christian Ballesteros (2026). sortMatrix (https://kr.mathworks.com/matlabcentral/fileexchange/80826-sortmatrix), MATLAB Central File Exchange. 검색 날짜: .

MATLAB 릴리스 호환 정보
개발 환경: R2020a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
태그 태그 추가

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
1.0.1

getIndicesInDim added (see https://www.mathworks.com/matlabcentral/fileexchange/80836-getindicesindim)

1.0.0