initialize a multidimensional matrix

2 vues (au cours des 30 derniers jours)
zhang
zhang le 19 Fév 2014
Given two numbers: M, N, how to create a matrix: res = MxMxMxMxM...xM, where ndims(res) == N.

Réponse acceptée

Azzi Abdelmalek
Azzi Abdelmalek le 19 Fév 2014
Modifié(e) : Azzi Abdelmalek le 19 Fév 2014
N=6;
m=4;
A=zeros(repmat(m,1,n));

Plus de réponses (0)

Catégories

En savoir plus sur Multidimensional Arrays dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by