Question
A MATLAB code is given below in order to plot data from a lab exercise: idmeas=[0.068 0.726 3.56 13.19 31.5 63.4 99.9]; %All measured id
A MATLAB code is given below in order to plot data from a lab exercise:
idmeas=[0.068 0.726 3.56 13.19 31.5 63.4 99.9]; %All measured id values in mA vgsmeas=[2.0 2.2 2.4 2.6 2.8 3.0 3.2]; %All measured vgs values idfit=[0 0 0 0]; %Measured id values used for curve fit vgsfit=[0 0 0 0]; %Measured vgs values used for curve fit p=polyfit(vgsfit,idfit,2); %Find 2nd order polynomial coefficients vgs1=[0:0.02:3.5]; %vgs range for parabola calculation, increment=0.02V id1=polyval(p,vgs1); plot(vgsmeas,idmeas,'*',vgs1,id1) %Points only for meas, line for calc axis([1 3.5 0 120]) %Typical axis settings, you can change xlabel('Vgs, V') ylabel('Id, mA') grid
a.) Fit the curve to a parabola. Edit the graph to show the parabola curve. Extract the parabola's coefficients given by the the array variable p.
b.) Plot the measured data from Tables 2 and 3 on the one graph of ID vs. VDS in part a. Use linear regression analysis on each plot separately to find best-fit lines matching the data.
Table 2:
VDS | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
ID | 12.7 | 13.15 | 13.613 | 14.134 | 14.703 | 15.337 | 15.96 | 16.675 | 17.385 | 18.225 |
Table 3:
VDS | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
ID | 24.350 | 25.420 | 26.55 | 27.875 | 29.355 | 30.456 | 32.332 | 33.977 | 36.385 | 38.759 |
Please help!!! And please provide the two codes.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started