initialize a multidimensional matrix

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

 Respuesta aceptada

Azzi Abdelmalek
Azzi Abdelmalek el 19 de Feb. de 2014
Editada: Azzi Abdelmalek el 19 de Feb. de 2014
N=6;
m=4;
A=zeros(repmat(m,1,n));

Más respuestas (0)

Categorías

Más información sobre Creating and Concatenating Matrices en Centro de ayuda y File Exchange.

Preguntada:

el 19 de Feb. de 2014

Editada:

el 19 de Feb. de 2014

Community Treasure Hunt

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

Start Hunting!

Translated by