Be the first to rate this file! 6 Downloads (last 30 days) File Size: 1.46 KB File ID: #31809

Merge Structures

by Grant Lohsen

 

15 Jun 2011

Merges two structures of equal sizes.

| Watch this File

File Information
Description

A simple function to merge two structures as long as they are the same size.
Ex:
[test1(1:2,1:2).A] = deal(1,2,3,4)
[test2(1:2,1:2).B] = deal(5,6,7,8)
out = fJoinStructures(test1, test2)
out =
2x2 struct array with fields:
    B
    A

MATLAB release MATLAB 7.12 (2011a)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
structure Grant Lohsen 15 Jun 2011 16:33:18
struct Grant Lohsen 15 Jun 2011 16:33:18
merge Grant Lohsen 15 Jun 2011 16:33:18
join Grant Lohsen 15 Jun 2011 16:33:18
struct array Grant Lohsen 15 Jun 2011 16:33:18

Contact us at files@mathworks.com