You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The reason we did this was, that checking weather to construct from the rv parameters or mean and Std is quite complex and Matlab does not support multiple constructors.
For example: What happens if you pass both the parameters and mean and std? What if you only pass one of the parameters and the mean? There are plenty of different cases resulting in a complex if, then, else structure.
I would be open for a simple way of doing this but in my opinion matlab does not offer a suitable solution for this. One of the downside of the way we abuse name/value pairs.
what is the benefit of instantiating an object using a method and not the constructor?
instead of
P = LognormalRandomVariable.fromMeanAndStd('mean', 5000, 'std', 400, 'Description', 'Load');
we should have
P = LognormalRandomVariable('mean', 5000, 'std', 400, 'Description', 'Load');
The text was updated successfully, but these errors were encountered: