|
|
메뉴릿
카테고리
전체공지사항 계획 Languages Humanities Mathematics Education Economics Computers HCI Media Engineering Natural Science TmaxSoft BluemoonSoft 미분류 최근 등록된 덧글
짝짝짝
올 많이 컸네 일구by izeye at 11/12 제가 갖고 있는 소스 파일.. by 언제나19 at 10/17 우왕 고맙습니다~~. .. by 언제나19 at 10/16 http://nethack.byus.. by uriel at 10/16 근본적으로 activation .. by uriel at 10/16 다운 안되는데여;;;;; by 강병진 at 10/14 일단, 형변환 자체가 .. by uriel at 04/11 어제는 괜히 xfix 실행.. by 언제나19 at 01/18 좀 기다리세요. 내년 4.. by 언제나19 at 11/04 바꾸어라.. 언제나19-.. by kang at 11/03 최근 등록된 트랙백
textcube를 다시 설치by 공부가 본업. gnuplot을 c 함수로 .. by 상품 + 글 의견 남기기 gsl, gnu scientific li.. by 상품 + 글 의견 남기기 ubuntu, ati에서 dual.. by 상품 + 글 의견 남기기 Data browser로 sql d.. by 공부가 본업. 근황 by Yi jeon goo 근황 by Yi jeon goo 라이프로그
![]() 화려한 휴가 ![]() 좋지 아니한가 ![]() 300 포토로그
메모장 실험
메모장도 로그가 남나 실험
이전블로그
more...이글루링크
◈ ◈ ◈ 바다가 머무는 ..Mono log Liard's newspaper Yochin의 대전생활. M log art.oriented * Sea of Blue * 이글루 파인더
|
Regression Success! with least square fitting with gnu scientific library 1. random number generation with gsl gsl_rng_env_setup(); rngtype = gsl_rng_default; rng = gsl_rng_alloc(rngtype); y[i] = x[i] + 3.0 * gsl_rng_uniform(rng); REF: Random Number Generator Examples 2. gnuplot_plot_xy() 3. gsl_fit_linear() Further information are in code below. Basics are in trackbacks below. ![]() always19@always19-desktop:~/project/SystemMonitor/gnuplot_i-2.10/test$ gcc -o drawlsf19 drawlsf19.c ../gnuplot_i.o -lgsl -lm -lgslcblas -L"/usr/lib" -I"../src" #include <stdio.h> #include "gnuplot_i.h" #include <gsl/gsl_fit.h> #include <gsl/gsl_rng.h> #define NUM_SAMPLES 50 int main(void) { double x[NUM_SAMPLES]; double y[NUM_SAMPLES]; const gsl_rng_type *rngtype; gsl_rng * rng; gnuplot_ctrl *h1; int i; double c0, c1, cov00, cov01, cov11, chisq; gsl_rng_env_setup(); h1 = gnuplot_init(); gnuplot_setstyle(h1, "points"); rngtype = gsl_rng_default; rng = gsl_rng_alloc(rngtype); for (i = 0; i < NUM_SAMPLES ; i++) { double u = gsl_rng_uniform (rng); x[i] = i ; y[i] = x[i] + 3.0 * u; } gsl_fit_linear(x, 1, y, 1, NUM_SAMPLES, &c0, &c1, &cov00, &cov01, &cov11, &chisq); gnuplot_plot_xy(h1, x, y, NUM_SAMPLES, "linear"); gnuplot_setstyle(h1, "lines"); gnuplot_plot_slope(h1, c1, c0, "regression"); gnuplot_plot_slope(h1, 1.0, 0.0, "slope"); getchar(); gnuplot_close(h1); gsl_rng_free(rng); return 0; }
|
|||