SCLRCMPRS

Version 1.0.0.0 (574 octets) par Mukhtar Ullah
Squeezes nonscalar arrays to scalars, if possible.
1,9K téléchargements
Mise à jour 27 jan. 2005

Aucune licence

SCLRCMPRS squeezes nonscalar arrays to scalars, if possible.
SCLRCMPRS(X) returns a scalar element if the array X is only the repetition of this scalar, X otherwise.

[X1,X2,...,Xn] = SCLRCMPRS(X1,X2,...,Xn) replaces non-scalar arrays having the same scalar repeated, with the scalars.

Example:
>> c1 = magic(4); c2 = repmat(2,5); c3 = 15; c4 = [9 9];
>> [c1,c2,c3,c4] = SCLRCMPRS(c1,c2,c3,c4)

c1 =

16 2 3 13
5 11 10 8
9 7 6 12
4 14 15 1

c2 =

2

c3 =

15

c4 =

9

Citation pour cette source

Mukhtar Ullah (2024). SCLRCMPRS (https://www.mathworks.com/matlabcentral/fileexchange/6420-sclrcmprs), MATLAB Central File Exchange. Récupéré le .

Compatibilité avec les versions de MATLAB
Créé avec R14
Compatible avec toutes les versions
Plateformes compatibles
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
Version Publié le Notes de version
1.0.0.0

Renamed to SCLRCMPRS