数据结构中字段的引用问题。
Show older comments
unction addressStruct(Struct,Field)
if isfield(Struct,Field)
fprintf('The value of the %s field is: ',Field);
disp(Struct.Field);
else
fprintf('Error:%s is not a valid field',Field);
end

Accepted Answer
More Answers (0)
Categories
Find more on App 构建 in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!