setweights
Sets automatically the weights for the data (to be used in a regression)
Contents
Syntax
weight = setweights (data, weight)
Description
computes weights for given data and adds it to the weight structure: one divided by the number of data-points
Inputs:
- data : structure with data
- weight : structure with weights
Output:
- weight : structure with added weights from data
Example of use
weight = setweights(data, []) computes the data weights for all data and outputs a new structure weight with the results weight = setweights(data, weight) computes the missing data weights in structure weight and adds them to it