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

조회 수: 3 (최근 30일)
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.

채택된 답변

Les Beckham
Les Beckham 2022년 12월 14일
I suggest the istable function. Documentation is here

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by