How to place the last alphabetic character from TS1

Write a single MATLAB statement that will accomplish the stated purpose. Assume a text string TS1 has already been defined. Place the last alphabetic character in TS1 into LastLetter. Example: TS1='%@3Gb6' returns LastLetter=b.

Respuestas (1)

Thorsten
Thorsten el 21 de En. de 2016
Editada: Thorsten el 21 de En. de 2016
TS1='%@3Gb6';
Lastletter = TS1(max(regexp(TS1, '[a-zA-Z]')))

La pregunta está cerrada.

Preguntada:

el 21 de En. de 2016

Cerrada:

el 20 de Ag. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by