MATLAB Answers

how can I change a character string from low case to upper case without using the formula of 'low()' and 'upper()' ?

3 views (last 30 days)
José Luis Garcia León
José Luis Garcia León on 27 Oct 2020
Answered: Walter Roberson on 27 Oct 2020
Hi I´m trying to find the way of doing an algorithm in where I will need to change a character string from low case to upper case or vice versa the thing is that I dont want to to it through the formula that Matlab gives, I´m trying to do it manually without that formula, at this moment this is all the progress I have:
function outString = Revrselow(inString)
outString= '';
for idx=1:length(inString)
outString = [outString inString(idx)];
if double(inString(idx)) >= 97 && double(inString(idx)) <= 122
ret= double(inString(idx)) >= 65 && double(inString(idx)) <= 90;
end
end
end
Thanks in advance.

  0 Comments

Sign in to comment.

Answers (1)

Community Treasure Hunt

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

Start Hunting!

Translated by