フィルターのクリア

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 Center および File ExchangeDescriptive Statistics についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by