You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
function [Out]=combineField(A,B)
% Combine two structure variables into one
% A and B are stuructures want to include both
% Out: Output.
fnames=fieldnames(B);
for is=1:length(fnames)
Data=getfield(B,fnames{is});
A=setfield(A,fnames{is},Data);
end
Out=A;
Cite As
Taesam Lee (2026). Combine two structure variables with different fields (https://au.mathworks.com/matlabcentral/fileexchange/71213-combine-two-structure-variables-with-different-fields), MATLAB Central File Exchange. Retrieved .
General Information
- Version 1.0.0 (1.14 KB)
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux
| Version | Published | Release Notes | Action |
|---|---|---|---|
| 1.0.0 |
