The measurements must be entered into a matrix called of dimension (n4) where is the number of data points. The analysis only uses the uncertainties associated n y with the measurements. The uncertainties are only included to show any error bars y x when the measurements are plotted. Measurements Matrix x x = wData(:, 1) y y = wData(:, 2) x dx = 3) y dy = wData(:, 4) It is necessary to clear all variables from the Workspace using the Matlab command clear all. The data (x, can be entered into the matrix and saved to a file from the y,x, y) wData1 Command Window using the Matlab command To use this data at any time use save. the Matlab command to retrieve the variable. Then let before load wData = wData1 running the m-script for weighted.m. Getting started in the Command Window: clear all all clc for 9 data points wData1 = Goto to the Workspace for the variable wData1 and enter data directly into the cells of the matrix displayed. Save the data: save wData1 wData1 (file name variable) Load the data: load wData1 Assign the data to wData: wData = wData1 Run the program fitting program: weighted You then will be prompted to enter: The minimum value for the fitted function. The maximum value for the fitted function. The title for the plot. The axis X The axis label. Y The equation to be fitted to the data by entering a number from 1 to 9 1: y = a1 * x + a2
The measurements must be entered into a matrix called of dimension (n4) where n is the number of data points. The analysis only uses the uncertainties y associated with the y measurements. The uncertainties x are only included to show any error bars when the measurements are plotted. Measurements Matrix x x = wData(:, 1) y y = wData(:, 2) x dx = 3) y dy = wData(:, 4) It is necessary to clear all variables from the Workspace using the Matlab command clear all. The data (x, y,x, y) can be entered into the matrix wData1 and saved to a file from the Command Window using the Matlab command save. To use this data at any time use the Matlab command load to retrieve the variable. Then let wData = wData1 before running the m-script for weighted.m. Getting started in the Command Window: clear all all clc wData1 = for 9 data points Goto to the Workspace for the variable wData1 and enter data directly into the cells of the matrix displayed. Save the data: save wData1 wData1 (file name variable) Load the data: load wData1 Assign the data to wData: wData = wData1 Run the program fitting program: weighted You then will be prompted to enter: The minimum value for the fitted function. The maximum value for the fitted function. The title for the plot. The X axis The Y axis label. The equation to be fitted to the data by entering a number from 1 to 9 1: y = a1 * x + a2
da_weighted_fit.docx