I have a data set with multiple fields of which several of the fields are different names for equivalent properties. I have rescaled and adjusted the data so that the quantities are comparable and want to merge them into a single field.
As a toy example, let's say I have:
s = struct('pounds', [nan nan 4.8], 'pennies', [120 370 nan]);
s.pennies = s.pennies/100;
How do I merge my incomplete fields to get the desired output:
snew = struct(pounds, [1.2 3.7 4.8]);