Start learning today, and be successful in your academic & professional career. Start Today!

• ## Related Books

 1 answerLast reply by: Ferdinand SolisThu Jan 30, 2014 5:44 PMPost by Professor Arash Vafanejad on January 27, 2014are you sure you write the code as I wrote; I guess you might have a syntax error. In case you can not find it, please send all your codes to me s I can check them.Arash 0 answersPost by Ferdinand Solis on January 27, 2014Professor,I did the Newton's approximation method example many times. After I input 15, I get this error message:Error using inline/subsref (line 13)Not enough inputs to inline function.Could you kindly tell me where the problem lies? Thanks.

### Function M-Files, Part 1

• In this session and next two ones we are examining functions and M-files that you will find useful, when you are developing your own programs.
• MATLAB enables you to create your own function M-files. A function M-file is similar to a script file in that it also has a .m extension. However, a function M-file differs from a script file in that a function M-file communicates with the MATLAB workspace only through specially designated inputand output arguments.
• Functions are indispensable when it comes to breaking a problem down into manageable logical pieces.
• Short mathematical functions may be written as one-line inline objects.

### Function M-Files, Part 1

Lecture Slides are screen-captured images of important points in the lecture. Students can download and print out these lecture slide images to do practice problems as well as take notes while watching the lecture.

• Intro 0:00
• Type 0:21
• Type Sin
• Type Fzero
• M-file Versus Script File 1:10
• Inline Objects 1:54
• Input Argument
• Function M-file 6:01
• Defining Function
• Function Y
• Relative Error
• Creating Finite Steps
• Display