Info

This question is closed. Reopen it to edit or answer.

Is there a way to do if/then for properties?

1 view (last 30 days)
ZH
ZH on 18 Jul 2020
Closed: MATLAB Answer Bot on 20 Aug 2021
I am adding sourcefile to my properties, but would like to have a conditional statement. If the file contains "_Units" then the file comes from place one
Else Place 2
So far, I have this :
T.Properties.CustomProperties.SourceFile
  2 Comments
Walter Roberson
Walter Roberson on 18 Jul 2020
contains(T.Properties.CustomProperties.SourceFile, '_Units')
???
Image Analyst
Image Analyst on 18 Jul 2020
if contains(T.Properties.CustomProperties.SourceFile, '_Units', 'IgnoreCase', true)
% It comes from place one.
% So do something with that info, like put it into a different column of the table or whatever.
else
% It comes from place two.
end

Answers (0)

This question is closed.

Community Treasure Hunt

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

Start Hunting!