Commit d1ca0814 authored by Maximilian Schnabel's avatar Maximilian Schnabel
Browse files

setProperties() now throws a warning when using unknown parameters

parent d47c379f
......@@ -768,6 +768,16 @@ classdef Motor < MaskedHandle & dynamicprops
% Parse...
p.parse(varargin{:});
if ~isempty(fieldnames(p.Unmatched))
A = fieldnames(p.Unmatched);
warn = 'The following input parameters were invalid: ';
warn = [warn A{1}];
for i = 2:length(A)
warn = [warn ', ' A{i}];
end
warning(warn)
end
% Set properties
if motor.init
motor.port = p.Results.port;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment