Radar System Analysis, Design and Simulation

Chapter 12: Miscellaneous Program Routines

This chapter contains 22 miscellaneous program routines we have used on occasion. Some of them do not fit under the proper chapter titles, and some are preparatory works on certain programs.

SORT_BUB.CPP

Sorting an array of data in ascending order analogous to air bubbles floating up to the surface, sorting-by-bubble.

SORT_SEL.CPP

Another sorting routine of data array, sorting-by-selection.

SORT_INX.CPP

Third sorting routine, an array of data sorted in ascending order without disturbing the sequence of the original array, sorting-by-index.

INSERT.CPP

A program routine for an arbitrary data to be inserted in an array.

SEARCH_L.CPP

This program searches an array linearly to find data we have designated (target data). When the target data is found this program identifies the index of the data (location).

SEARCH_B.CPP

Similar to above search program except the search is executed after the array is partitioned into two subarrays repetitively until the data is found, search-by-binary is faster than search-by-linear.

PRIME.CPP

A program that generates the prime numbers.

FCTRIAL.CPP

Factorial, computes factorial of an integer, K!

K!_EXACT.CPP

Computes the exact value of k! when k<=30.

K!_APPRX.CPP

Computes an approximate of k! when k>=20.

PERMUTAT.CPP

Computes permutation, given two integers n and k, n >k. P(n, k) = n!/(n-k)!

COMBINAT.CPP

Computes combination, given two integers n and k, n >k. C(n, k) = n!/k!/(n-k)!

The next three programs demonstrate how to find the root(s) of a function, f(x) = 0. Actually we try to find the crossing point(s) of two functions, f 1(x) and f 2(x).

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Color Sensors
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.