How to Set Up If/Else Statement with Condition of Seeing if Item in Structure Array is a Table

3 Ansichten (letzte 30 Tage)
Hello,
I have a structure array with variable number of items.
Some of these items are just words, saying something like 'This is not what you need'.
The rest of the items are a table.
I eventually want to plot one of the columns of each table in the structure array vs another vector
I want to do an if statement that checks if the item is a table, so something like:
for i=1:N
if struct(i).Day == table
scatter(Time_Vector,struct(i).Day(:,2))
else
end
end
Is this something that is possible in MATLAB?
If my question doesn't make sense, I can elaborate.
Thanks.

Akzeptierte Antwort

Les Beckham
Les Beckham am 14 Dez. 2022
I suggest the istable function. Documentation is here

Weitere Antworten (0)

Produkte


Version

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by