필터 지우기
필터 지우기

How to create a 4 dimensional array??

조회 수: 179 (최근 30일)
Michael
Michael 2011년 12월 1일
댓글: Precious Chukwuezi 2023년 12월 30일
This is just a general question because I can't find it anywhere, but does anyone know how to create a 4-D array? What would the basic code be for it or just a basic example of one would be great!

채택된 답변

Walter Roberson
Walter Roberson 2011년 12월 1일
Supposing A and B are 3 dimensional arrays, then cat(4,A,B) would join them along the fourth dimension.
  댓글 수: 1
Jan
Jan 2011년 12월 1일
This works for 2D arrays also, because they are just special 3D arrays. See: "cat(4, 1, 1)".

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

추가 답변 (1개)

the cyclist
the cyclist 2011년 12월 1일
편집: John Kelly 2015년 2월 26일
Here is a trivial example:
>> A = zeros(2,3,5,7);
>> A(1,2,1,2) = 6;
>> A(1,1,5,6) = 5;
>> A(2,1,1,:) = pi;
  댓글 수: 3
erfan vahdat
erfan vahdat 2020년 7월 28일
thanks
Precious Chukwuezi
Precious Chukwuezi 2023년 12월 30일
thanks

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

카테고리

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