An N by N by N matrix code
显示 更早的评论
采纳的回答
更多回答(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!