Open mforets opened 6 years ago
There might be more problematic cases. Maybe consider adding a prefix/suffix to all variable names (like _
) as a preprocessing step.
whos(Base)
gives the full list
i like the idea of name_1
similar to instantiation of base/network components in SpaceEx model editor
to check that there is a name issue we can do:
if any(vi ∈ names(Base) for vi in variables)
warn("conflict of a variable name and an existing name detected")
end
It would be more helpful to output one of the variables vi
that are conflicting.
If one of:
e
I
is detected in
then some special care should be taken. For example transforming to math expressions in
convert
.For a unit test see this comment