O'Reilly logo

MATLAB For Dummies by John Paul Mueller, Jim Sizemore

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 9

Expanding MATLAB’s Power with Functions

In This Chapter

arrow Finding and using built-in functions

arrow Defining and using your own functions

arrow Understanding other function types

Simplification is an important part of creating any useful application. The better you can outline what tasks the application performs in the simplest of terms, the easier it is to define how to interact with and expand the application. Understanding how an application works is the reason you use functions. A function is simply a kind of box in which you put code. The function accepts certain inputs and provides outputs that reflect the input received. It isn’t important to understand precisely how the function performs its task unless your task is to modify that function, but being able to visualize what task the function performs helps you understand the application as a whole. The only requirement is that you understand the inputs and resulting outputs. In short, functions simplify the coding experience.

This chapter is about three sorts of functions. You have already used quite a few built-in functions, but simply using them may not be enough. You need to understand a little more about the inputs and ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required