Can you create a matrix where every element is a vector?

조회 수: 6 (최근 30일)
JESUS LOPEZ ARENAL
JESUS LOPEZ ARENAL 2021년 10월 21일
댓글: JESUS LOPEZ ARENAL 2021년 10월 21일
I want to create a 3 dimensional matrix (i.e. 100*100*100) where every element in that matrix is a n-dimensional vector (i.e. (1,2,3)), there is any way or command to asign a vector to a element of my matrix?

채택된 답변

KSSV
KSSV 2021년 10월 21일
You can consider each element as a cell. And then create a cell array. But why?
A = cell(2) ;
A{1,1}=rand(1,3) ;
A{1,2}=rand(1,3) ;
A{2,1}=rand(1,3) ;
A{2,2}=rand(1,3) ;
celldisp(A)
  댓글 수: 1
JESUS LOPEZ ARENAL
JESUS LOPEZ ARENAL 2021년 10월 21일
I tried it and think it will work. Is for a simulation on material properties. Thanks you KSSV.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Matrices and Arrays에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by