STIR  6.2.0
Functions
do_linear_regression.cxx File Reference

A simple programme to perform weighted least squares. More...

#include "stir/linear_regression.h"
#include "stir/VectorWithOffset.h"
#include "stir/error.h"
#include <fstream>
#include <iostream>

Functions

int main (int argc, char **argv)
 

Detailed Description

A simple programme to perform weighted least squares.

Author
Kris Thielemans
PARAPET project

This performs a weighted least squares fit.
stdev and covariance are computed using the estimated variance chi_square/(n-2).

The file should contain data in the following format:
number_of_points
coordinates
data
weights