amat icon indicating copy to clipboard operation
amat copied to clipboard

Bug in demo.m

Open git-dc opened this issue 5 years ago • 0 comments

Bug in line 20 of tsogkas/amat/demo.m caused by bug in tsogkas/spb-mil/testSPB.m:

Error: Dot indexing is not supported for variables of this type. testSPB.m: Line 110- | modelName = lower(model.name);

Cause: in tsogkas/spb-mil/testSPB.m: if the model variable is a char (line 77 - if cond.), but the model path does not exist, (line 79 - if cond.), the model should be created (trigger else on line 83), however at the moment the 'else' on line 83 is paired with 'if' on line 77, which means that the model struct is created if the model variable is not a char, which would be nonsensical and in the case that the model variable is a char, but the path does not exist, no action is performed and model stays a char, which triggers an exception on line 110 in testSPB.m.

Proposed Fix: increase nesting indentation level of the else statement on line 83 in testSPB.m by one to be paired with if statement on line 79.

As is now: as_is

Fixed: fixed

git-dc avatar May 13 '19 09:05 git-dc