16 lines
373 B
Matlab
16 lines
373 B
Matlab
function A = warmUpExercise()
|
|
|
|
% Instructions: Return the 5x5 identity matrix
|
|
% In octave, we return values by defining which variables
|
|
% represent the return values (at the top of the file)
|
|
% and then set them accordingly.
|
|
A = zeros(5, 5);
|
|
for i=1:5
|
|
A(i, i) = 1;
|
|
end
|
|
|
|
% ===========================================
|
|
|
|
|
|
end
|