01:198:107 Lecture 3: Functions, Vectors, and Strings

107 views4 pages

Document Summary

Want a function that is not built in. Ex. compute the area of a square, given the length of a side. A function can have zero or more parameters. Numbers of arguments in the call must match numbers of parameters in function. Once you define a function, it works just like the built-in functions. When you return from a function call go back to where the call came from. When a function is called ( invoked ) an area of memory is set aside to store. 2:3:14 means 2 5 8 11 14. 4: -1: 1 means 4 3 2 1. Matlab can operate on a whole vector of numbers at once. A character is any single letter, digit, punctuation, symbol. A character string is just a vector of characters. Upper(str) - returns a copy of str in all upper case lower(str) - returns a copy of str in all lower case length(str) - returns number of characters in str.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents

Related Questions