initialize a multidimensional matrix

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

Risposta accettata

Azzi Abdelmalek
Azzi Abdelmalek il 19 Feb 2014
Modificato: Azzi Abdelmalek il 19 Feb 2014
N=6;
m=4;
A=zeros(repmat(m,1,n));

Più risposte (0)

Categorie

Scopri di più su Multidimensional Arrays in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by