how can i change data type of any variable

9 Ansichten (letzte 30 Tage)
ablaze
ablaze am 29 Mär. 2017
Bearbeitet: Stephen23 am 29 Mär. 2017
how can i change data type of any variable. i am using R2012a matlab. because by default its taking every value as a decimal.

Antworten (1)

Jan
Jan am 29 Mär. 2017
The default type used by Matlab is double (not "decimal"). You cannot change the default type, but you can easily specify a different type for a variable:
a = uint8(17)
But with
b = 17
the type of b is double.

Kategorien

Mehr zu Get Started with MATLAB finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by