In Matlab, we can convert the case of a string using the upper and lower functions. However, if we want to keep the case of the string unchanged, we can simply copy the string to a new variable. Here's an example:
main.m93 chars3 lines
The new_str variable now contains the same string as str. We can verify this by comparing the two strings:
main.m22 chars2 lines
The output of this command should be true.
gistlibby LogSnag