Ch5_13 - Next Previous Click to edit Master subtitle style...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Next Previous Click to edit Master subtitle style Section 5.13: User Defined Functions Section 5.13: User Defined Functions 11 Section 5.13: User Defined Functions Next Previous Section 5.13: User Defined Functions Section 5.13: User Defined Functions 22 Arguments are passed by VALUE! Variable names are local (EVEN THOSE IN ARGUMENTS) There are two files- mainprogram.m and the function, curve.m Because functions are separate files: they can be called by any MATLAB program but must be copied to the folder of the calling program The function must be in same folder as the main program file Functions are separate m-files Next Previous Section 5.13: User Defined Functions Section 5.13: User Defined Functions 33 Executing mainprogram.m mainprogram.m and curve.m are in the Chapter5 Examples folder Next Previous Section 5.13: User Defined Functions Section 5.13: User Defined Functions 44 Repeating the mainprogram.m example using global variables No return values...
View Full Document

Page1 / 7

Ch5_13 - Next Previous Click to edit Master subtitle style...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online