Quantcast
Channel: Programming – Xinyustudio
Viewing all articles
Browse latest Browse all 284

MFC:Using Numerical Recipe in C++

$
0
0

I was forced to come back to MFC, as the company I am now serving still uses VisualStudio.net 2002.

The happy days using C# are gone,… tears…

Below is my trial to use code from Numerical Recipe in C++, 3rd ed, in a MFC dialog application:

1. Include “nr3.h” where all the data structures and function interfaces are defined.

MFCNumericalRecipe_B

2. You need also to include specific module in which you are interested in. In this example, I am trying to use LU decomposition based methods to solve linear equation.

Define the coefficient matrix for Ax=b:

MFCNumericalRecipe_A

The solution is then obtained.

MFCNumericalRecipe_C

Cheers!


Filed under: MFC

Viewing all articles
Browse latest Browse all 284

Trending Articles