Info
This question is closed. Reopen it to edit or answer.
How can I get MATLAB to return Alpha1=4
1 view (last 30 days)
Show older comments
Write a single MATLAB statement that will accomplish the stated purpose. Assume a text string TS1 has already been defined. Place the numeric index of the first alphabetic character in TS1 into Alpha1. Example: TS1='%@3Gb6' returns Alpha1=4.
2 Comments
Guillaume
on 21 Jan 2016
This must be some class assignment, the question has already been asked here:
Joshua McMillan
on 22 Jan 2016
That link is a link to a similar question, but it is not the same question
Answers (1)
Star Strider
on 21 Jan 2016
This will work:
TS1='%@3Gb6';
Alpha1 = regexp(TS1, '[A-Za-z]')
Alpha1 =
4
0 Comments
This question is closed.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!