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??

Answers (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)

This question is closed.

Products

Asked:

on 1 Dec 2012

Closed:

on 20 Aug 2021

Community Treasure Hunt

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

Start Hunting!