[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 3D array of strings

From: Przemek Klosowski
Subject: Re: 3D array of strings
Date: Fri, 1 Nov 2013 12:01:59 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0

On 10/31/2013 09:03 AM, MrOba wrote:
can you give me a practical example? say a 3x3x2 array..
for i=1:3; for j=1:3; for k=1:2; s3d{i,j,k}=sprintf("%d,%d,%d",i,j,k); end; end; end

results in 3d cell array of strings where e.g. s3d{1,3,2} is "1,3,2".

BTW, what's the simplest way to display an entire cell array? typing s3d just says it's a {3x3x2 Cell Array}, whereas  a similar 3D numerical array displays its elements? s3d{:} displays all the values but with no indices.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]