An N by N by N matrix code
이전 댓글 표시
How do I code for N x N x N matrix using a letter.
채택된 답변
추가 답변 (3개)
Walter Roberson
2025년 9월 23일
N = 20; %for example
Letter = 'D'; %for example
Array3d = repmat(Letter, N, N, N);
For sake of ridiculousness:
N = double('d'); % using a letter
myarray = zeros(N,N,N); % a NxNxN array
size(myarray)
Yes, I did think about creating a volumetric image of a letter, but I'm lazy today.
Magisha
2025년 10월 2일
0 개 추천
imshow(iwant)
댓글 수: 1
Walter Roberson
2025년 10월 2일
This is the final line from @KSSV answer, and does not make any sense without the previous code posted by KSSV.
카테고리
도움말 센터 및 File Exchange에서 Data Type Conversion에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!