initialize a multidimensional matrix

Given two numbers: M, N, how to create a matrix: res = MxMxMxMxM...xM, where ndims(res) == N.

 採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2014 年 2 月 19 日
編集済み: Azzi Abdelmalek 2014 年 2 月 19 日

0 投票

N=6;
m=4;
A=zeros(repmat(m,1,n));

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeCreating and Concatenating Matrices についてさらに検索

質問済み:

2014 年 2 月 19 日

編集済み:

2014 年 2 月 19 日

Community Treasure Hunt

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

Start Hunting!

Translated by