Start Discovering Solved Questions and Your Course Assignments
TextBooks Included
Solved Assignments
Asked Questions
Answered Questions
gauss gauss-jordan eliminationfor 2 times 2 systems of equations there are well-defined easy solution techniques though for the larger systems of
example of plotting from a functionfor illustration the function can be called as shown below gtgt y 1293 y
illustration of graphics propertiesa particular property can also be exhibited for illustration to view the line width gtgt
customizing plotsthere are numerous ways to customize figures in the figure window on clicking the plot tools icon will bring up the property editor
plot functionsfaraway we have plotted to generate two-dimensional plots and bar to generate bar charts we have seen how to clear the figure window by
program of built-in factorial functioncalling this function yields similar result as the built-in factorial functiongtgt fact5ans 120gtgt
example of recursive functionsthis definition is recursive as a factorial is defined in terms of the other factorial there are two parts to any
recursive functionsthe recursion occurs whenever something is defined in terms of itself in the programming a recursive function is a function which
nested functionswe have seen that the loops can be nested that means that one inside of the other functions can be nested the terminology for nested
uses of function handlesthe function handles can also be generated for functions other than anonymous functions both built-in amp user-defined
illustration of anonymous functionsdissimilar functions stored in the m-files when no argument is passed to an anonymous function the parentheses
function cirarea - anonymous functionsthe function handle name is cirarea the one argument is passed to the input argument radius the body of the
anonymous functionsthe anonymous function is a very easy one-line function the benefit of an anonymous function is that it does not have to be stored
reading from a mat-filethe load function is used to read from various types of files as with save function by default the file will be supposed to be
appending variables to the mat-fileappending to the file adds to what has been saved in a file and is accomplished by using the -append option for
illustration of writing variables to a filefor illustration in the below session in the command window 3 variables are generated these are then
writing variables to a filethe save command is used to write variables to a file or to append the variables to a mat-file by the default save
illustration of spreadsheet filesthis reads the numbers in a double vector variable nums and the text in a cell array txt the xlsread function
function xlsread - file functionthe function xlsread will read from the spreadsheet file for illustration to read from file just generatedgtgt ssnums
writing and reading spreadsheet filesthe matlab functions xlswrite amp xlsread will write to and read from the spreadsheet files which have the
illustration of writing to fileshere is the other illustration in which a matrix is written to a file at first an arbitrary 2 times 4 matrix is
function fopen - file functionthe permission string in the call to the fopen function identifies that the file is opened for writing to it just as
fprintf function - file functionthe fprintf function really returns the number of bytes which was written to the file therefore if you do not want to
writing to filesthere are many lower level functions which can write to files we will focus on the fprintf function that can be used to write a file
advanced file input and outputwhere format involves the conversion characters much like those used in the fprintf function for illustration to read