Signals and Systems Homework Assignment 1 Exercise 1: 1. The two columns of data from Table 10.1 as two column vectors T and V in MATLAB. T = (0:10:100)'; % Temperature in increments of 10 from 0 to 100 degrees Celsius V = [12.3 18.2 25.4 37.0 43.6 55.8 62.0 67.8 70.4 72.1 73.0]'; % Voltage in millivolts 2. Linear approximation of the data using MATLAB code vs fitlm(T, V) and polyfit(T, V, 1). ×1 = >> fitlm(T,V) 0.6674 15.5045 Rsquared_1 = 0.9491 >> polyfit(T,v,1) ans = 0.6674 15.5045 ans = Linear regression model: y ~ 1 + x1 Estimated Coefficients: Estimate SE tstat pValue (Intercept) 15.505 x1 0.66736 3.047 0.051503 5.0885 12.958 0.00065525 3.9931e-07 Number of observations: 11, Error degrees of freedom: 9 Root Mean Squared Error: 5.4 R-squared: 0.949, Adjusted R-Squared: 0.943 F-statistic vs. constant model: 168, p-value = 3.99e-07
3. Second order approximation of the data using MATLAB code vs polyfit(T, V, 2). ×2 = >> polyfit(T,V,2) -0.0048 1.1472 8.3070 Rsquared_2 = 0.9874 ans = -0.0048 1.1472 8.3070 4. Third order approximation of the data using MATLAB code vs polyfit(T, V, 3). x3 = polyfit(T,V,3) -0.0001 0.0086 0.6379 11.5126 ans = -0.0001 0.0086 0.6379 11.5126 Rsquared_3 = 0.9969 -- ---
5. A plot of the first order, second order, and third order approximation models of the 'Temperature vs Voltage Reading' data. 90 - First order Second order 80 Third order Temperature vs Voltage Readings 70 60 50 Voltage Reading (mV) 40 30 1 20 10 0 0 10 20 30 40 50 60 Temperature (?) 70 80 90 100 6. Sensor resolutions over the domains 0°? to 70? and 70? to 100? based on linear regression models over a range of + 2.2 mV and + 0.2 mV. % Sensor resolution on the domain 0-70 degrees Celsius for a range of +/- % 2.2 mV resolution1_0to70 = 4.4*(1/m1); % Sensor resolution on the domain 0-70 degrees Celsius for a range of +/- % 0.2 mV resolution2_0to70 = 0.4*(1/m1); % Sensor resolution on the domain 70-100 degrees Celsius for a range of +/- % 2.2 mV resolution1_70to100 = 4.4*(1/m2); % Sensor resolution on the domain 70-100 degrees Celsius for a range of +/- % 0.2 mV resolution2_70to100 = 0.4*(1/m2);