수치해석 연습문제풀이
- 최초 등록일
- 2009.07.02
- 최종 저작일
- 2009.07
- 29페이지/
한컴오피스
- 가격 1,500원
![할인쿠폰받기](/images/v4/document/ico_det_coupon.gif)
소개글
한양대학교 이관수 교수님 수치해석 연습문제 숙제입니다
다른 교수님들에 비해 빡쌔게 한 숙제입니다
목차
● 문 제 9-(c) 일계 미분 방정식
● 문 제 12 연립 미분 방정식
● 문 제 23 질량-스프링 시스템
● 문 제 27 부표의 진동
● 문 제 30 RLC 회로 시스템
본문내용
/* 6th Runge-Kutta Method */
#include<stdio.h>
#include<conio.h>
#include<math.h>
#define n 1
void runge_6th(float t); // 6계 Runge-Kutta 법
void deriv(float t,float dy[]); // Find the derivatives of the equations
float Y[n+1]={0,1}; //Solution of the equations, Y[0] 은 사용하지 않는다
float YPRIME[n+1];
float T=0.0, TEND=10,h=0.1;
main()
{
float t;
printf("===============================================");
printf("n T Y1 ERROR(Y1) Y2 ERROR(Y2) n");
printf("-----------------------------------------------");
printf("n0.0 %8.6f 0.0 %8.6f 0.0n",Y[1],Y[2]);
for(t=T;t<TEND;t+=h)
{
runge_6th(t);
}
printf("===============================================n");
getch();
}
모듈 함수
void runge_6th()
void runge_6th(float t)
{ int i;
float K[7][n+1],YK[n+1]; // YK[n+1] 는 k 값에서 y 항의 계산
float e,ea;
deriv(t,Y);
for(i=1;i<=n;i++)
{
K[1][i]=YPRIME[i];
참고 자료
없음