initialize a multidimensional matrix

4 次查看(过去 30 天)
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 CenterFile Exchange 中查找有关 Elementary Math 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by