Combine 2 Structures / have a nice weekend
Show older comments
As you can see here, i am trying to combine two structures. It works ! But is there a faster way ?
Variable = length(OldInputData)
for k = 1:length(InputData)
OldInputData(Variable + k).shotnumber = InputData(k).shotnumber
OldInputData(Variable + k).UsedAmp = InputData(k).UsedAmp
OldInputData(Variable + k).ClosestAmp = InputData(k).ClosestAmp
OldInputData(Variable + k).OptimalAmp = InputData(k).OptimalAmp
OldInputData(Variable + k).Factor = InputData(k).Factor
OldInputData(Variable + k).ReadSSX = InputData(k).ReadSSX
OldInputData(Variable + k).ssx_t = InputData(k).ssx_t
end
Have a nice weekend!
Accepted Answer
More Answers (1)
I did something very similar myself just the other week, but since that seems to be a ready-built explanation of various methods there isn't much point me fishing out whatever method I ended up using!
Categories
Find more on Structures 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!