Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

How to write the correlation function in C programming please and will give me the last output? Problem 2 (35 points Develop a C program

How to write the correlation function in C programming please and will give me the last output? image text in transcribed
Problem 2 (35 points Develop a C program that processes a file called "fl.txt" and "f2.txt" containing a sequence of real-valued numbers. Your program should calculate and display Mean of data from fl.ixt Mean of data from f2.txt Standard Deviation of data from fl.txt Standard Deviation of data from fl.txt Correlation between the data contained in the files. Length is the number of data points in each of the files. You must use the following user-defined functions in your code #define SIZE 500 void read file(FILE inp, double z[], int length); read file read data from the text file pointed to by inp and keep all data points in the array z void calc mean (int length, double zti, double mean) //calc mean find mean of data points in the array z with number of elements length void calc std (int length, double z[], double std); //calc std find standard deviation of data points in the array z with number of elements length Ifxandyare arrays containing the sequence of number that were read then 499 corr(x,y) 500 s where 499 499 2 499 500X my 500 output (code execution): Mean of data in f1.txt is 2.03440 Mean of data in f2.txt is 3.01058 Standard deviation of data in f1.txt is 0.97672 Standard deviation of data in f2.txt is 1.00190 The correlation is 0.25396

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Microsoft SQL Server 2012 Unleashed

Authors: Ray Rankins, Paul Bertucci

1st Edition

0133408507, 9780133408508

More Books

Students also viewed these Databases questions

Question

What is a histogram and how is one used?

Answered: 1 week ago