diff --git a/src/classes/@Result/Result.m b/src/classes/@Result/Result.m index 91d79f56c13baf56ab8fd19770f81a5cd2b66ef8..0e71c09ab0971a88a42f19ce24807092f6c7bb54 100644 --- a/src/classes/@Result/Result.m +++ b/src/classes/@Result/Result.m @@ -81,6 +81,13 @@ classdef Result < handle % Note: A bug in Matlab prevents the use of variable names when size checks are added % in the property definition. See: https://stackoverflow.com/q/48423003 self.operPts = val; + + % Properly name and group operating points for multi rotors + % Must merge in that order to have correct indexes + nRots = (size(val, 2) - 2) / 2; + self.operPts = mergevars(self.operPts, 3 + nRots:size(val, 2)); + self.operPts = mergevars(self.operPts, 3:3 + nRots - 1); + self.operPts.Properties.VariableNames = {'altitude', 'speed', 'rpm', 'collective'}; end diff --git a/src/rotare.m b/src/rotare.m index 166a1867d2e7c9062fa628c27703bf9dc413ce32..7ef0451e2afc361db4579acf9f108a506fbf04f5 100644 --- a/src/rotare.m +++ b/src/rotare.m @@ -141,7 +141,8 @@ function [Results] = rotare(configFile) % Table that identifies the operating point for future reuse operPoints(iOperPoint, :) = [Uop.altitude(iAlt), Uop.speed(iSpeed), ... - Uop.rpm(i, iRpm), Uop.collective(i, iColl)]; + [Uop.rpm(:, iRpm)'], ... + [Uop.collective(:, iColl)']]; iOperPoint = iOperPoint + 1;