This example shows how to fit a straight line to data points using MATLAB's polyfit and polyval functions. First, vectors x and y hold the data points. Then polyfit(x,y,1) computes the best line coefficients, slope and intercept. Next, polyval evaluates the fitted line at each x. Finally, plotting shows original points and the fitted line. The execution table traces each step, showing variable values and results. Key moments clarify why polyfit returns two numbers, what the degree means, and why fitted values differ slightly from original data. The visual quiz tests understanding of coefficients, evaluation step, and effect of changing polynomial degree. The snapshot summarizes syntax and behavior for quick reference.