Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program that calculates the sinc function and stores the results in an array with 1000 values. Your program should contain two arrays: Stores

Write a program that calculates the sinc function and stores the results in an array with 1000 values. Your program should contain two arrays:

  1. Stores x values between -2pi and 2pi with increments of 4*pi/SIZE
  2. Stores y = sin( x * pi ) / (x * pi)
  3. #include #include

    int main( void ) { // declare array with 1000 values const int SIZE = ; const double pi = 3.14159265359; // x array starts at -2*pi and increments at 4*pi/SIZE // calculate sinc function = sin(pi*x)/pi*x at every x value

    // print out every 50 values printf(" X\tSINC(X) "); for( int i = 0; i < SIZE; i = i + 50) { printf("%6.2lf\t%6.2lf ", x[i], sinc[i]); }

    return 0; }

C program

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

Step: 3

blur-text-image

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

Database Design Using Entity Relationship Diagrams

Authors: Sikha Saha Bagui, Richard Walsh Earp

3rd Edition

103201718X, 978-1032017181

More Books

Students also viewed these Databases questions

Question

ZA OO UNO fritzing Maximum size for new files: 200MB, maximum

Answered: 1 week ago

Question

Evaluate employees readiness for training. page 275

Answered: 1 week ago