initialize a multidimensional matrix
4 views (last 30 days)
Show older comments
Given two numbers: M, N, how to create a matrix: res = MxMxMxMxM...xM, where ndims(res) == N.
0 Comments
Accepted Answer
Azzi Abdelmalek
on 19 Feb 2014
Edited: Azzi Abdelmalek
on 19 Feb 2014
N=6;
m=4;
A=zeros(repmat(m,1,n));
0 Comments
More Answers (0)
See Also
Categories
Find more on Elementary Math in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!