This preview shows page 1. Sign up to view the full content.
Unformatted text preview: (f, 4) % find root in vicinity of 4
>> x = fzero(f, ‐4) % find root in vicinity of ‐4
‐6.8990 Function definition command
>> f = @(x) a*x^2 + b*x + c;
Function definition. Function arguments (inputs).
Does not have to be x.
Multiple inputs are possible. Name by which the function will be known. This does not have to be f. The argument names serve only to identify arguments within the definition. They have no other significance (variables are not created and any existing variables having the same names are not affected).
When variables (e.g. a, b, c) are used in a function definition the function is based on the current values of these variable. If the variables are subsequently changed the function does NOT chang...
View Full Document
This note was uploaded on 03/30/2013 for the course ECOR 2606 taught by Professor Goheen during the Spring '10 term at Carleton CA.
- Spring '10