help-octave
[Top][All Lists]
Advanced

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

Re: colon operation


From: Brett Green
Subject: Re: colon operation
Date: Sat, 28 Mar 2020 15:35:28 -0400


On Sat, Mar 28, 2020 at 3:15 PM GK19 <address@hidden> wrote:
a (:,:, 3,10,6,1) =
    45 119 15.242 21.568 115.843 139.661 16.265
   255.978 923.596 78.549 102.645 679.539 833.699 81.573

   This is the output of the program. Can something tell me what is a (:,:,
3,10,6,1)

   What does 3 , 10, 6, 1 indicate? I am new to matlab. Kindly help



--
Sent from: https://octave.1599824.n4.nabble.com/Octave-General-f1599825.html

The colon operator is more or less the same as "1:end", so that
  a (:,:, 3,10,6,1)
returns a matrix with lentries
  a (x, y, 3,10,6,1)
for every possible x and y.

In your example, "a" is a 6-dimensional array. 3, 10, 6 and 1 are the indices for the third through the sixth dimensions.

reply via email to

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