parse error and Directory error for class definition
hey guys, in the below code, i am having 2 errors:
I cannot run the code due to this error: "A class definition must be in an "@" directory",
there is a "parse error usage might be invalid matlab syntax" at line "inputData"
the working folder in this case is : C:UsersautoCar@PCTemplates@preprocessor
inside templates folder I have also other working .m scripts, but without any class definitions.
matlab verison R2015b
How to solve this issues?
Thankyou!
classdef preprocessor
properties
vehicleParameters
weatherConditions
roadDefinitions
maneuvers
faultInjections
end
methods
function obj = preprocessor(vehicleParams, weatherConds, roadDefs, maneuvers, faults)
if nargin > 0
obj.vehicleParameters = vehicleParams;
obj.weatherConditions = weatherConds;
obj.roadDefinitions = roadDefs;
obj.maneuvers = maneuvers;
obj.faultInjections = faults;
end
end
end
end
%% %% Define the structure containing all parameters and values
inputData = struct();hey guys, in the below code, i am having 2 errors:
I cannot run the code due to this error: "A class definition must be in an "@" directory",
there is a "parse error usage might be invalid matlab syntax" at line "inputData"
the working folder in this case is : C:UsersautoCar@PCTemplates@preprocessor
inside templates folder I have also other working .m scripts, but without any class definitions.
matlab verison R2015b
How to solve this issues?
Thankyou!
classdef preprocessor
properties
vehicleParameters
weatherConditions
roadDefinitions
maneuvers
faultInjections
end
methods
function obj = preprocessor(vehicleParams, weatherConds, roadDefs, maneuvers, faults)
if nargin > 0
obj.vehicleParameters = vehicleParams;
obj.weatherConditions = weatherConds;
obj.roadDefinitions = roadDefs;
obj.maneuvers = maneuvers;
obj.faultInjections = faults;
end
end
end
end
%% %% Define the structure containing all parameters and values
inputData = struct(); hey guys, in the below code, i am having 2 errors:
I cannot run the code due to this error: "A class definition must be in an "@" directory",
there is a "parse error usage might be invalid matlab syntax" at line "inputData"
the working folder in this case is : C:UsersautoCar@PCTemplates@preprocessor
inside templates folder I have also other working .m scripts, but without any class definitions.
matlab verison R2015b
How to solve this issues?
Thankyou!
classdef preprocessor
properties
vehicleParameters
weatherConditions
roadDefinitions
maneuvers
faultInjections
end
methods
function obj = preprocessor(vehicleParams, weatherConds, roadDefs, maneuvers, faults)
if nargin > 0
obj.vehicleParameters = vehicleParams;
obj.weatherConditions = weatherConds;
obj.roadDefinitions = roadDefs;
obj.maneuvers = maneuvers;
obj.faultInjections = faults;
end
end
end
end
%% %% Define the structure containing all parameters and values
inputData = struct(); matlab, oop, student, class MATLAB Answers — New Questions