Start Discovering Solved Questions and Your Course Assignments
TextBooks Included
Solved Assignments
Asked Questions
Answered Questions
displaying the cell arraysthere are several techniques of displaying the cell arrays the celldisp function shows all elements of the cell
referring to and showing cell array elements and attributesjust as with the other vectors we can refer to individual elements of the cell arrays the
creating a cell arraythe other method of creating a cell array is easy to assign values to particular array elements and build it up element by
creating cell arraysthere are many ways to create cell arrays for illustration we will create a cell array in which one element will store an integer
data structuresthe data structures are variables which store more than one value in order to made sense to store more than one value in a variable
str2num function - stringthe function str2num does the opposite it takes the string in which a number is stored and converts it to the type
num2str functionthe num2str function that converts real numbers can be called in many ways if only the real number is passed to the num2str function
converting between the string and number typesthe matlab has many functions which convert numbers to strings in which each character element is a
ischar functionthe ischar function return the logical true if an array is a character array or logical false if notgtgt vec ek127gtgt ischarvecans
is functions for stringsthere are many functions for strings that return logical true or false the function isletter returns the logical true when
splits a string the strtok function splits a string into pieces it can be called in many ways the function receives one string as an input
replacing a string - function strrepthe function strrep finds all the occurrences of a substring within the string and substitutes them with a new
finding a sting - function strfindthe function strfind does necessarily similar thing except that the order of the arguments does make dissimilarity
finding a sting - function findstrthe function findstr receives two strings as input arguments it finds all the occurrences of shorter string
replacing finding and separating stringsthere are numerous functions which find and replace the strings or parts of strings within the other strings
function strncmpthe function strncmp compares only the first n characters in the strings and ignores the rest the initial two arguments are strings
comparing stringsthere are few functions which compare strings and return logical true when they are equivalent or logical false when not the
changing casethe matlab has two functions which convert strings to all uppercase letters or all lowercase known as the upper and lowergtgt mystring
deblank functionthe deblank function eliminates only trailing blanks from the string not leading the blanks the strtrim function will eliminate both
removing whitespace charactersthe matlab has functions which will eliminate trailing blanks from the end of a string andor leading blanks from the
sprintf functionthe sprintf function works precisely like the fprintf function but rather than printing it generates a string here are some
blanks functionthe blanks function will generate a string consisting of n blank characters-that are kind of hard to see here though in a matlab if
creating customized stringsthere are many built-in functions which create customized strings including blanks char and sprintfwe know that the char
strvcat function - concatenationthe function strvcat will concatenate it vertically that means that it will generate a column vector of the
strcat function - concatenationthe strcat function though will eliminate the trailing blanks from strings before concatenating note that in these