| Filter Design Toolbox | ![]() |
Indexing into a Cell Array of Vectors or Matrices
To index into a cell array of matrices (as opposed to a cell array of cell arrays), you only need one set of braces to index into the cell array.
Here's an example of accessing cell array information from a quantized filter with a single section. In this case, the filter coefficient information is stored as a cell array of vectors.
Example -- Accessing Coefficient Information from Filters with One Section
You can specify a sample quantized filter by typing
Notice that the filter reference coefficients are stored in a two-by-one cell array of vectors, the way you specified them.
Suppose that you want to retrieve the values stored in this property.
Use curly braces to index into and access the first entry of the cell array Hq.ReferenceCoefficients. You can use the shorthand for property names when you index into the properties of Hq.
To access the third entry in Hq.ref{2}, index into Hq.ref{2} in the standard way.
| Using Cell Arrays | Indexing into a Cell Array of Cell Arrays | ![]() |
Learn more about the latest releases of MathWorks products: |
| © 1994-2010 The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |