Programming and Data Types    

Function Summary

This table shows the string functions, which are located in the directory named strfun in the MATLAB Toolbox.

Category
Function
Description
General
blanks
String of blanks
cellstr
Create cell array of strings from character array
char
Create character array (string)
deblank
Remove trailing blanks
eval
Execute string with MATLAB expression
String Operations
findstr
Find one string within another
lower
Convert string to lowercase
strcat
Concatenate strings
strcmp
Compare strings
strcmpi
Compare strings, ignoring case
strjust
Justify string
strmatch
Find matches for string
strncmp
Compare first N characters of strings
strncmpi
Compare first N characters, ignoring case
strrep
Replace string with another
strtok
Find token in string
strvcat
Concatenate strings vertically
upper
Convert string to uppercase
String Tests
iscellstr
True for cell array of strings
ischar
True for character array
isletter
True for letters of alphabet.
isspace
True for whitespace characters.
String to Number
Conversion

double
Convert string to numeric codes
int2str
Convert integer to string
mat2str
Convert matrix to eval'able string
num2str
Convert number to string
sprintf
Write formatted data to string
str2double
Convert string to double-precision value
str2num
Convert string to number
sscanf
Read string under format control
Base Number Conversion
base2dec
Convert base B string to decimal integer
bin2dec
Convert binary string to decimal integer
dec2base
Convert decimal integer to base B string
dec2bin
Convert decimal integer to binary string
dec2hex
Convert decimal integer to hexadecimal string
hex2dec
Convert hexadecimal string to decimal integer
hex2num
Convert IEEE hexadecimal to double-precision number


  Character Arrays (Strings) Character Arrays