Extract number from cell with decimal

1 回表示 (過去 30 日間)
Cristian Martin
Cristian Martin 2022 年 6 月 8 日
コメント済み: Cristian Martin 2022 年 6 月 8 日
Hi,
Is there a way to extract from a cell with a number with two decimals, separatetly the value before . and separate the decimals?
number1 = a{:,12}; %here extract the full number 44.10 and I want number 1 = 44 and number2 = 10

採用された回答

Dyuman Joshi
Dyuman Joshi 2022 年 6 月 8 日
y={44.10};
befdec=floor(y{1})
befdec = 44
aftdec=rem(y{1},1)
aftdec = 0.1000
  1 件のコメント
Cristian Martin
Cristian Martin 2022 年 6 月 8 日
Thank you!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

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

製品


リリース

R2015a

Community Treasure Hunt

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

Start Hunting!

Translated by