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

2 views (last 30 days)
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.

Accepted Answer

Les Beckham
Les Beckham on 14 Dec 2022
I suggest the istable function. Documentation is here

More Answers (0)

Products


Release

R2021a

Community Treasure Hunt

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

Start Hunting!