File tree 3 files changed +31
-4
lines changed
3 files changed +31
-4
lines changed Original file line number Diff line number Diff line change @@ -10,9 +10,9 @@ __By Vanderbilt University__
10
10
| [ Week 4: Functions] ( #week-4 ) | [[ Programming Assignments]] ( #programming-assignments-2 ) |
11
11
| [ Week 5: Programmer's Toolbox] ( #week-5 ) | [[ Programming Assignments]] ( #programming-assignments-3 ) |
12
12
| [ Week 6] ( #week-6 ) | [[ Programming Assignments]] ( #programming-assignments-5 ) |
13
- | [ Week 7] ( #week-7 ) | [[ Quizzes ]] ( #quizzes-6 ) [[ Programming Assignments]] ( #programming-assignments-6 ) |
14
- | [ Week 8] ( #week-8 ) | [[ Quizzes ]] ( #quizzes-7 ) [[ Programming Assignments]] ( #programming-assignments-7 ) |
15
- | [ Week 9] ( #week-9 ) | [[ Quizzes ]] ( #quizzes-8 ) [[ Programming Assignments]] ( #programming-assignments-8 ) |
13
+ | [ Week 7] ( #week-7 ) | [[ Programming Assignments]] ( #programming-assignments-6 ) |
14
+ | [ Week 8] ( #week-8 ) | [[ Programming Assignments]] ( #programming-assignments-7 ) |
15
+ | [ Week 9] ( #week-9 ) | [[ Programming Assignments]] ( #programming-assignments-8 ) |
16
16
17
17
18
18
## Week 1: Course Pages
@@ -51,7 +51,10 @@ No Graded Assignment or Quiz
51
51
- [ Assignment: Lesson 5 Wrap-Up] ( week-6/valid_date.m )
52
52
53
53
## Week 7: Loops
54
-
54
+ ### Programming Assignments
55
+ - [ Assignment: for-loop Practice] ( week-7/halfsum.m )
56
+ - [ Assignment: ] ( )
57
+ - [ Assignment: ] ( )
55
58
56
59
## Week 8: Data Types
57
60
Original file line number Diff line number Diff line change
1
+ function s = halfsum(M )
2
+ [n , m ] = size(M );
3
+ s = 0 ;
4
+ for row = 1 : n
5
+ for column = row : m
6
+ s = s + M(row , column );
7
+ end
8
+ end
9
+ end
Original file line number Diff line number Diff line change
1
+ function p = is_leap_year(year )
2
+ if mod(year , 4 ) == 0
3
+ if mod(year , 100 ) == 0
4
+ if mod(year , 400 ) == 0
5
+ p = true ;
6
+ else
7
+ p = false ;
8
+ end
9
+ else
10
+ p = true ;
11
+ end
12
+ else
13
+ p = false ;
14
+ end
15
+ end
You can’t perform that action at this time.
0 commit comments