initialize a multidimensional matrix

조회 수: 5 (최근 30일)
zhang
zhang 2014년 2월 19일
편집: Azzi Abdelmalek 2014년 2월 19일
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에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by