<IMG SRC="../images/misg.gif" WIDTH=267 HEIGHT=65 BORDER=0><> English Version   Kimo  Sina   Yahoo 

Search Engine | Seminar  | Training Courses  |  Home
Members | Medical Images | Statistical Computing | Research | Links
Bioinformatics | Group Meeting | Toolboxs
| Chinese Articles 
wpe12.jpg (961 bytes)
  Send comments or suggestions    
Updated:2000/10/25 since 1999.3.1

 

在Visual Stdio (C++) 中使用IMSL
C Numerical Library (CNL)

1. 將imsl放在C:\Program Files\DevStudio\

wpe1.jpg (13307 bytes)

2. 將子目錄imsl\bin下的cmath.dll和cstat.dll拷貝到c:\windows\system下

wpe2.jpg (12083 bytes)

3. 設定imsl路徑:
    開啟Visual Stdio (C++), 選Tools\Options...\Directories,把imsl的LIB和INCLUDE目錄的路徑加入。

wpe4.jpg (41568 bytes)

wpe5.jpg (42440 bytes)

4. 在程式中使用IMSL
     test.cpp

#include <stdio.h>
#include <imsls.h>   //需include的head file

void main()
{
   int n_random = 5;
   int k = 6;
   int *ir;

   imsls_random_seed_set(123457);
   ir = imsls_f_random_uniform_discrete(n_random, k, 0);
   imsls_i_write_matrix("Discrete uniform (1, 6) random 
                                deviates:" , 1, n_random, ir,
                               IMSLS_NO_COL_LABELS, 0);
    return;
}

5. 把C:\Program Files\DevStudio\imsl\lib下的cstat.libcmath.lib加到project中。

wpe6.jpg (39514 bytes)

6.

(1) Compile test.cpp
(2) Rebuild All
(3) Excute test.exe

wpe7.jpg (2901 bytes)
  1    2       3


7. OK。

wpe8.jpg (16888 bytes)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

logo.gif (4473 bytes)

Copyright 1999 Medical Images-Stat. Group , NCTU-STAT.

Send comments or suggestions to u8626802@stat.nctu.edu.tw