[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Access Values of Cell Array deeply nested within Structure Array
From: |
Patrick Pintelon |
Subject: |
Re: Access Values of Cell Array deeply nested within Structure Array |
Date: |
Wed, 15 Apr 2020 22:49:22 +0200 |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 |
maybe this can help
https://stackoverflow.com/questions/60927436/octave-cell-array-with-cells-to-concatenate
On 15/04/2020 20:22, babelproofreader wrote:
> I have a nested structure_array/cell_array/structure_array of character
> values which is the result of a web query which returns a converted JSON
> object, the needed numeric value(s) of which I can access in a loop thus:
>
> str2double( S.orderBook.buckets{ loop_ix }.price )
>
> However, I was wondering whether there is a quicker/more elegant way of
> getting these values? At the moment, for my purposes, I am having to run a
> "look up" for loop that encloses an "if statement" to get in the ballpark of
> the required numeric values, and then run a second for loop in the region of
> the ballpark to extract these required values.
>
> Note: Cross posted at
> https://stackoverflow.com/questions/61233692/access-values-of-cell-array-deeply-nested-within-structure-array
> <https://stackoverflow.com/questions/61233692/access-values-of-cell-array-deeply-nested-within-structure-array>
>
>
>
>
>
> --
> Sent from: https://octave.1599824.n4.nabble.com/Octave-General-f1599825.html
>
>
--
Greta & Patrick Pintelon
address@hidden
address@hidden