Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Engr 1732 Lab 8 Regression Data Analysis and two Dimensioned Arrays 1.) write a

ID: 3802432 • Letter: E

Question

Engr 1732 Lab 8 Regression Data Analysis and two Dimensioned Arrays 1.) write a cyc+ program that does first order linear regression a on the three laboratory data sets listed below. Note your program should print out a separate table of calculated results for each original (x, set the new values of Y calculated for original values of x using the newly determined slope and Each of the 3 printed out tables should list the original (x,Y)data and the new curve fitted data denoted by po, new) Note the original x values do not change, only the Y values. Cap volts Energy(ul) Tempo "C Diode Log freq Gain 20 720 mv 2556 303 497 35 683 340 0.57 p 35 45 666 51 0.668 50 657 3.556 104 107 0.707 A 2-4 A52 55 645 3.857 0.89 14.9 212 60 636 4.156 097 20.2 398 65 624 4.334 0.985 70 616 4.46 1998 75 603 4.756 R1.00 578 553 use the following formulas for sums 1, S2, S3 and S4. The x,Y data set should be entered by typing in each x[i]and Ylil value using a for loop with cin>>xlil and cin >Yli].After data is entered, use formulas below inside a for loop: For (int i 0; ik N-1; it+)

Explanation / Answer

#include<stdio.h>
int main()
{
/* 2D array declaration*/
printf("Enter Number of rows");
int rows=0,col=0;
scanf("%d",rows);
printf("Enter Number of rows");
scanf("%d",col);
int disp[rows][col];
  

/*Counter variables for the loop*/
int i, j;

for(i=0; i<=rows; i++)
{ int c1,c2,c3,c4;
for(j=0;j<=col;j++)
{
printf(" %d,%d", i, j);

scanf("%d", &disp[i][j]);
printf(" ");
}
}
return 0;
}