フィルターのクリア

Data type conversion in Matlab

1 回表示 (過去 30 日間)
Abdurrehman
Abdurrehman 2017 年 8 月 26 日
回答済み: KSSV 2017 年 8 月 26 日
I have a fundamental question i.e. if I write in Matlab
Variable = 10;
the variable will be of double class and 8 bytes wide.
now if I change its type as
variable=uint8(variable);
it will be converted to an unsigned int and will be 1 byte wide
The problem is here when I assign a new value to this variable it changes its class automatically and goes back to double class whereas I had changed its class from double to uint8.
Can anyone address this issue, please?

採用された回答

KSSV
KSSV 2017 年 8 月 26 日
Default class in matlab is double. If you want class uint8 every time you have to use it.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by