Shared Flashcard Set

Details

Test 2 coverage 2
Chap 6
10
Computer Science
Undergraduate 1
03/06/2011

Additional Computer Science Flashcards

 


 

Cards

Term
'...'
Definition
encloses string
Term
char(...)
Definition
cast to character string
Term
double(a)
Definition
casts to type double
Term
ischar(a)
Definition
returns logical tue if type is class char and false if otherwise.
Term
num2str(a)
Definition
converts number to its numerical representation in string.
Term
sprintf(a)
Definition
formats a string result:
important ones
%s - string
%d - double
Term
strcmp(a1, a2)
Definition
Compares 2 strings of equal length gives a true if they are the same and false if they are not the same.

strcmp on 2 cell arrays will give a vector of 1s and 0s where they are true and false.
Term
strcmpi(a1, a2)
Definition
Compares 2 strings of equal length gives a true if they are the same and false if they are not the same REGARDLESS OF CASE.

strcmpi on 2 cell arrays will give a vector of 1s and 0s where they are true and false.
Term
strfind(str, 'char')
Definition
find the index where the start of the 'char' is in the string str.
Term
strtok(str, 'char')
Definition
[a, b] = strtok(str, 'char')
a = before delimiter ('char')
b = delimiter and after.
Supporting users have an ad free experience!