Error_1_It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS. Error- Index (zero based) must be greater than or equal to zero and less ...
Unless your goal is to somehow improve on what is already written, or you simply don't have those existing tools, then you should never be reinventing the wheel. Use existing code, for example, regress is in the stats toolbox. Or you could even use my polyfitn ...
When the measurement errors are unknown, are set to 1 for alli, and the curve fitting is performed without weighting. However, when the experimental errors are known, we can treat these errors as weights and use weighted fitting. In this case, the chi-square can be written as: ...