particleFilter.validateBestN
Ensure that the “Best N” weighting scheme is valid after updating nMembers
Syntax
Description
Checks that the Best N weighting scheme remains valid after altering the number of members. If setting new values, throws an error if the number of members is less than the number of best N particles. If deleting values and no members remain, reverts to a Bayesian weighting scheme and warns the user.
Customize console messages and error ID headers.
Input Arguments
type
string scalar
Indicates the type of operation that resulted in a changed nMembers. Use “set” if setting new values, and “delete” if deleting old values.
name
string scalar
The name of the data input being altered.
header
string scalar
Header for thrown error IDs.
Output Arguments
obj
scalar particleFilter object
The particleFilter object with a valid weighting scheme.