Skip to content
Snippets Groups Projects
Commit bc61b5b9 authored by Marco Luigi Gaibotti's avatar Marco Luigi Gaibotti
Browse files

[handle-value-conversion] Added updateAll method

parent 214cfe14
No related branches found
No related tags found
1 merge request!17Convertion from handle to value type classes
...@@ -123,6 +123,16 @@ classdef Wind < Config ...@@ -123,6 +123,16 @@ classdef Wind < Config
obj@Config(mission, varIn); obj@Config(mission, varIn);
end end
function obj = updateAll(obj)
obj.magnitude = obj.updateDistribution(obj.MAGNITUDE_DISTRIBUTION, obj.MAGNITUDE_PARAMETERS);
obj.azimuth = obj.updateDistribution(obj.AZIMUTH_DISTRIBUTION, obj.AZIMUTH_PARAMETERS);
obj.elevation = obj.updateDistribution(obj.ELEVATION_DISTRIBUTION, obj.ELEVATION_PARAMETERS);
obj.checks(1) = length(obj.magnitude) == length(obj.ALTITUDES);
obj.checks(2) = length(obj.azimuth) == length(obj.ALTITUDES);
obj.checks(3) = length(obj.elevation) == length(obj.ALTITUDES);
end
function [uw, vw, ww] = getVels(obj, z) function [uw, vw, ww] = getVels(obj, z)
if ~all(obj.checks) if ~all(obj.checks)
error(['Parameters and distributions must be the same ' ... error(['Parameters and distributions must be the same ' ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment