If I have a cell array like this:
>> mycellarray = [{'Country' 'State' '1/22/01' '1/23/01' '1/24/01'};{'Afghanistan' '' [0 0] [0 1] [0 2]}]
mycellarray =
2×5 cell array
{'Country' } {'State' } {'1/22/01'} {'1/23/01'} {'1/24/01'}
{'Afghanistan'} {0×0 char} {[ 0 0]} {[ 0 1]} {[ 0 2]}
I can retrieve all the data values I need using:
>> myvals = mycellarray(2,3:5)
myvals =
1×3 cell array
{[0 0]} {[0 1]} {[0 2]}
I would like to extract the 2nd element in each vector, so I would get a vector back like this:
[0 1 2]
How would I do that?
tablefor these data.