Professional Documents
Culture Documents
Review Final
Review Final
Student ID:
REVIEW
Guideline: Save your assignment in PDF file under the name StuName_StuID
(10 points)
3. Plot 𝑓(𝑥) and replot 𝑥(𝑡) from your MATLAB code on Question 1 & 2
(10 points)
Part 2: For and While-Loop (Total 30 points)
Compute these following functions by two methods: For-Loop and While – Loop
𝑥𝑘
1. 𝑓1 (𝑥, 𝑛) = ∑𝑛𝑘=1 (10 points)
𝑘
2. 𝑓2 (𝑥, 𝑛) = ∑𝑛−1
𝑘=0 𝑥
𝑘
(10 points)
3. Use user-defined function to code these two functions with inputs of
𝑥 and 𝑛. Then, plot 2 figures of 𝑓1 (0.5, 𝑛) and 𝑓2 (0.5, 𝑛) (10 points)