parse error and Directory error for class definition
Show older comments
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:\Users\auto\Car@PC\Templates\@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();
Accepted Answer
More Answers (0)
Categories
Find more on Construct and Work with Object Arrays 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!