Azzera filtri
Azzera filtri

Convert type while keeping values

1 visualizzazione (ultimi 30 giorni)
Hg
Hg il 6 Feb 2017
Risposto: KSSV il 6 Feb 2017
How to convert the type of an array while keeping the value of all elements? For example, A = [200 150 30] in uint16 to B = [200 150 30] in uint8.

Risposta accettata

KSSV
KSSV il 6 Feb 2017
A = uint16([200 150 30]) ;
B = uint8(A) ;
class(A)
class(B)

Più risposte (0)

Categorie

Scopri di più su Data Type Conversion in Help Center e File Exchange

Tag

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by