Study Guides (390,000)
CA (150,000)
York (10,000)
ITEC (100)
Quiz

# ITEC 2600 Quiz: ITEC2600 Exercise 2Exam

Department
Information Technology
Course Code
ITEC 2600
Professor
Xiaofeng Zhou
Study Guide
Quiz

This preview shows half of the first page. to view the full 1 pages of the document.
ITEC2600 in-Class Exercises X.Zhou York University
ITEC 2600
Introduction to Analytical Programming
Lab Exercise 2
1. Redo all examples from class.
2. Create anonymous functions for the following math functions, where input argument(s) xor ycan be a
vector(use element-by-element operations).
(a) f(x) = ex2+1
pcos(x2+ 2)
(b) f(x, y) = 2x24xy +y3
Calculate f(x) given x= 2 and x= [1 2 3 4].
Calculate f(x, y) given x= 1, y = 2 and x= [1 2 3 4], y = [2 3 4 5].
3. Re-do Sales Example. Find out the most proﬁtable product and location.
4. 2-D plot. Plot the following functions in one ﬁgure window, add title and legend to graph.
f1(x) = 2x+ 1
f2(x) = x22
f3(x) = sin(2x1), where x[2π, 2π].
5. 3-D plot. Given function f(x, y) = x2+ysin(xy), draw 3-D graph of contour, plot3, mesh, surface
on the intervals x[2π, 2π] and y[2π, 2π].
6. Add axis, legend and title to the graphs in question 3 and 4.
7. Re-do Temperature Example.
1