We write our first .m function in MATLAB.
00:00 -Introduction
00:22 -How function files are similar to script files
00:45 -Syntax for creating our own function in MATLAB
01:10 -Define the output argument(s) for our function
01:33 -Write the function name that must match the .m function file name
01:56 -Define the input argument(s) for our function
02:23 -The function body comes between function and end keyword
02:55 -Example 1: Make new directory for vectorSizeTest project
03:29 -Example 1: Create a new function file
04:12 -Example 1: write first line of documentation for function
04:41 -Example 1: Documenting outputs and inputs
06:26 -Example 1: Checking the syntax for function definition
06:53 -Example 1: Save function file with proper name
07:42 -Example 1: Create a “driver” script file to debug our function file
09:32 -Example 1: Debug with simple function body
11:55 -Example 1: Check that we have two input arguments with nargin
14:23 -Example 1: Check that input arguments are not empty
16:11 -Example 1: Check that both input arguments are vectors
17:53 -Example 1: When do two vectors have same number of entries
21:52 -Example 1: Write the if-elseif-else statement
24:37 -Example 1: Debug by testing two input vectors for same size
27:38 -Example 1: Use a driver script to debug and test
28:17 -Good programming practice: iterate our design process using drivers
28:45 -Community Challenge: Test if two matrices are conformable for matrix multiplication
29:19 -Conclusion