Skip to content
Snippets Groups Projects
Verified Commit 60d5baf7 authored by leprob001's avatar leprob001
Browse files

fix: getMember failed when a table contains different datatypes, now...

fix: getMember failed when a table contains different datatypes, now supporting string and double after table2array conversion
parent 2d4972dc
No related branches found
No related tags found
No related merge requests found
347 348
\ No newline at end of file \ No newline at end of file
...@@ -29,9 +29,16 @@ for i = 1:length(pMember) ...@@ -29,9 +29,16 @@ for i = 1:length(pMember)
end end
if istable(memberValue) if istable(memberValue)
if any(isnan(table2array(memberValue))) if strcmp(class(table2array(memberValue)), 'double') % OB
memberValue = pDefaultValue; if any(isnan(table2array(memberValue)))
return memberValue = pDefaultValue;
return
end
elseif strcmp(class(table2array(memberValue)), 'string') % OB
if any(isnan(double(table2array(memberValue)))) % OB
memberValue = pDefaultValue; % OB
return % OB
end % OB
end end
elseif isnan(memberValue) elseif isnan(memberValue)
memberValue = pDefaultValue; memberValue = pDefaultValue;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment