You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
This function uses mostly the 'upper' and 'lower' functions to convert a text string to additional case types including 'Title Case', 'Sentence case', 'tOGGLE cASE', and 'RaNDoMizEd cASe'.
Type 'help caseconvert' for usage details.
Examples:
caseconvert('sample text','title') returns 'Sample Text'
caseconvert('Sample Text','toggle') returns 'sAMPLE tEXT'
caseconvert({'new york' 'california'},'randomized')
returns {'neW yoRk' 'CAlIFORnIA'}
caseconvert({'This Is A Test.' 'Matlab'},{'sentence' 'upper'})
returns {'This is a test.' 'MATLAB'}
[Please subscribe to this file if you use it, so you can be notified of updates.]
Cite As
Skynet (2026). Case Converter (https://www.mathworks.com/matlabcentral/fileexchange/6275-case-converter), MATLAB Central File Exchange. Retrieved .
Acknowledgements
Inspired: changeCase(S, caseType)
General Information
- Version 1.0.0.0 (2.58 KB)
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux
| Version | Published | Release Notes | Action |
|---|---|---|---|
| 1.0.0.0 | Made a few minor changes as suggested by M-Lint. |
