Skip to content

Commit 08bd643

Browse files
authored
Fix code-gen issue
1 parent 6bbf48b commit 08bd643

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Path2D.m

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,12 @@
7171
end%Constructor
7272

7373
function obj = set.ArcLengths(obj, val)
74-
assert(numel(val) == obj.numel())
74+
if coder.target('matlab')
75+
% Without the if-statement, this breaks Simulink code-gen
76+
% in some cases (tested with R2014b)
77+
assert(numel(val) == obj.numel(), ...
78+
'Incorrect length of ArcLengths property!')
79+
end
7580
obj.ArcLengths = val(:);
7681
end%fcn
7782

0 commit comments

Comments
 (0)