필터 지우기
필터 지우기

Write a function with one input integer argument that returns an output matrix(MQ) which is a 2n by 2n matrix. MQ consist of 4 n-by-n submatrices top left are all ones top right corner are all 2's bottom left are 3's and bottom right are 4's

조회 수: 2 (최근 30일)
function [MQ] = myquadrants(n) I don't know how to set up the matrix

채택된 답변

Massimo Zanetti
Massimo Zanetti 2016년 9월 28일
편집: Massimo Zanetti 2016년 9월 28일
Here it is.
function MQ = myquadrants(n)
MQ=[ones(n),2*ones(n);
3*ones(n),4*ones(n)];
end

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Descriptive Statistics에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by