Diedrichsen Lab:Notebook/Test/2017/06/07
From OpenWetWare
Jump to navigationJump to search
Test Project 1 | Main project page Next entry |
MATLAB Assignment 4_Problem 1
1. Write a function called intquad that takes as its input arguments two scalar positive integers
named n and m in that order. The function returns Q, a 2n-by-2m matrix. Q consists of four n-by-m
submatrices. The elements of the submatrix in the top left corner are all 0s, the elements of the
submatrix at the top right are 1s, the elements in the bottom left are 2s, and the elements in the
bottom right are 3s.
function q1 = intquad(n,m) q1(1:n,1:m) = 0;
|