what function is used to make this condition??

if there are number 386504398760, we want to read just digit number 5, so we will result 0, or we read just number 2 and 3, so we result 86.. what function is used to make this condition??

回答(2 个)

a=386504398760
b=num2str(a)
out=str2num(b(2:3))
Try this:
a=386504398760
string_a = num2str(a)
digitNumber5 = string_a(5)
digitNumbers23 = string_a(2:3)

此问题已关闭。

产品

关闭:

2021-8-20

Community Treasure Hunt

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

Start Hunting!

Translated by