bio_img_videos

Stuart’s MATLAB Videos

Watch and Learn

Concatenating Struct Arrays with Different Fields

When I read data from the web, using webread or websave, usually all records returned have the same information and, as a result, appear in MATLAB as a struct array. But sometimes they do not have the same information and appear as a cell array containing structures with different fields. This has recently happened in one of my scripts, so I need to address this but I think it would be useful for me to come up with a utility to handle this scenario in general, as it often happens.

Features covered in this code-along style video include:

  • vertcat
  • setdiff

Play the video in full screen mode for a better viewing experience. 

|
  • print

Comments

To leave a comment, please click here to sign in to your MathWorks Account or create a new one.