initialize a multidimensional matrix

5 ビュー (過去 30 日間)
zhang
zhang 2014 年 2 月 19 日
編集済み: Azzi Abdelmalek 2014 年 2 月 19 日
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 日
N=6;
m=4;
A=zeros(repmat(m,1,n));

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by