how to get a part of a number

3 ビュー (過去 30 日間)
matthieu
matthieu 2022 年 10 月 8 日
回答済み: Voss 2022 年 10 月 8 日
x = 1234567891011112
The output should be 56

回答 (1 件)

Voss
Voss 2022 年 10 月 8 日
x = 1234567891011112;
x_str = num2str(x)
x_str = '1234567891011112'
x_str = x_str([5 6])
x_str = '56'
str2double(x_str)
ans = 56

カテゴリ

Help Center および File ExchangeSimulink Environment Customization についてさらに検索

タグ

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by