Skip to content
Snippets Groups Projects
Commit 6c936f06 authored by Giuseppe Brentino's avatar Giuseppe Brentino Committed by Marco Luigi Gaibotti
Browse files

Apply 1 suggestion(s) to 1 file(s)

parent fd3a1253
No related branches found
No related tags found
1 merge request!2Final data structure
......@@ -65,7 +65,9 @@ classdef Motor < Bay
if isempty(obj.mission.name) || isempty(obj.name), return; end
load(fullfile(obj.mission.dataPath, 'motors.mat'), 'motors');
chosenMotor = motors(strcmp({motors.MotorName}, obj.name));
if isempty(chosenMotor), error(strcat('Unable to find engine: ', obj.name)); end
if isempty(chosenMotor)
error(strcat('Unable to find engine: ', obj.name));
end
obj.diameter = chosenMotor.D;
obj.length = chosenMotor.L;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment