CATALIGN

versión 1.1.1 (4.64 KB) por Andres
concatenate/align/left-,right-,...-justify numbers/text/... in any dimension with padding

3 descargas

Actualizada 1 Jul 2021

Ver licencia

catalign concatenates variables in any dimension regardless of their sizes by padding them up to the minimum required length.
Some Examples:
· concatenate variables with non-matching sizes along dimension 1, padding with zeroes.
>> x = catalign(1,0,[1 2],[3;4;5])
x =
1 2
3 0
4 0
5 0
· place three vectors/arrays to a separate page, padded with NaNs, align to the highest indices
>> x = catalign(-3,NaN,[1 2 3],[4 5;6 7],[8;9])
x(:,:,1) =
NaN NaN NaN
1 2 3
x(:,:,2) =
NaN 4 5
NaN 6 7
x(:,:,3) =
NaN NaN 8
NaN NaN 9
· concatenate char arrays, right-justified
>> x = catalign("r",' ',{'right-','justified','text'})
x =
' right-'
'justified'
' text'
· mix centered images
impepp = imread('peppers.png');
imcorn = imread('corn.tif',2);
imcope = catalign(4.5,uint8(0),impepp,imcorn);
figure, imshow(max(imcope,[],4))

Citar como

Andres (2022). CATALIGN (https://www.mathworks.com/matlabcentral/fileexchange/94025-catalign), MATLAB Central File Exchange. Recuperado .

Compatibilidad con la versión de MATLAB
Se creó con R2021a
Compatible con cualquier versión
Compatibilidad con las plataformas
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!