Start Discovering Solved Questions and Your Course Assignments
TextBooks Included
Solved Assignments
Asked Questions
Answered Questions
built-in function for differentiationthe matlab has a built-in function diff that returns the differences between consecutive elements in a vector
function isreal - complex numbersthe function isreal returns 1 for logical true when there is no imaginary part of the argument or 0 for false when
print an imaginary numberto print an imaginary number the function disp will show both parts automaticallygtgt dispz1 40000 20000ithe
built-in functions for complex numbers we know that in matlab both i and j are built-in functions which return radic-1 therefore they can be
complex numbersa complex number is commonly written in the formz a bihere a is known as the real part of the number z b be the imaginary part of z
interpolation and extrapolationin most cases it is desired to estimate values other than at the sampled data points for illustration we may want to
roots function - polynomialsthe roots function in matlab is used to find the roots of an equation represented by a polynomial for illustration for
polynomialssimple curves are polynomials of various degrees or orders the degree is the integer of the highest exponent in the expression the
function imreadthe function imread can read an image file for illustration a jpeg jpg file the function reads color images into a 3-dimensional
built-in colormapsthe matlab has numerous built-in colormaps which are named the reference page on colormap shows them calling the function colormap
image processingthe images are represented as grids or matrices of picture elements known as pixels in matlab an image usually is represented as a
core objectsthe core objects in matlab are the very fundamental graphics primitives the description can be found under the matlab help under the
function used in sound filesthe matlab has numerous other functions which let you read and play sound or audio files in the audio files sampled data
sound filesthe sound signal is an illustration of a continuous signal which is sampled to result in a discrete signal in this situation sound waves
binary searchthe binary search supposes that the vector has been sorted first the algorithm is just similar to the way it works whenever looking for
index vectorthe index vector is then used as the indices for original vector to get grades vector in ascending order the indices used would be grades
example of sorting stringsto sort a cell array of strings also the sort function is used the illustration is as followsgtgt engcellnames
function sortrows - sorting stringsthe function sortrows sorts each and every row as a block or group and it also will work on numbers here in this
illustration of sorting stringsto sort on the rows rather than second dimension should be specifiedgtgt sortwords2ans hellohdowyhigbdeooycaioit can
sorting stringsfor the matrix of strings the sort function works exactly as formerly for numbers for illustrationgtgt words charhi hello howdy
function issorted - set operationsthe function issorted will return 1 for logical true when the argument is sorted in ascending order minimum to
intersect function and setdiff functionthe intersect function rather than returns all the values which can be found in both of the input argument
illustration of set operationsfor illustration given the vectors as shown belowgtgt v1 26v1 2 3 4 5 6gtgt v2 127v2 1 3
set operationsthe matlab has numerous built-in functions which perform set operations on vectors these involve intersect union setdiff unique and
illustration of medianwhen the vector is not in sorted order to start with the median function will still return the right answer it will sort the