wow! now I am officially graduate student. Entering mechatronic 1st lab under ando supervisor. Still feel like a stranger even today is my 3rd days in this lab.
bout reseach
-my supervisor offer me new theme but i dont have confidence to do it all from the beginning. So i took the present theme that left. Is about mengnetic gear. Sound interesting right?! yeah! but it a simple experiment about mesuring megnetic gear`s ouput torque and configuring how to increase the output torque.
haha...boring...
bout lab
mecha 1 labs came with same size compare to my previous lab, but compact with many student. double size I guess. They are pretty nice but so shy and doing the own work all the time.
haha...2nd boring...sucks one
tomorrow my class will be start. I have to wake up early morning..
Tuesday, April 7, 2009
Tuesday, February 3, 2009
entry for 4/2/2008
it is weird if i write conclusion fisrt then experiment result and discussion.
my plan for this week is to start writing maezuri & powerpoint for presentation.
and to understand every single part of the thesis. then, guessing the possible question that maybe asked by them(prof)
wednesday :
thursday :
friday :
saturday :
sunday :
Wednesday, July 2, 2008
okay, our mission is simple. How to make a set of data and put into a math function, calculate, and save the result in one file.
first of all built a simple linear graph function like y=mx+c, then, define all the coefficient. Then, built step by step.
1. put the header
2. define all the coefficient
3. built the input form
4. built the save data form
5. built the calculation function
thats all. the most important part here is to define the array "hairetsu" means the range of data. for example input x=1,2,3....till 100, we can write it
int i <<
double x1[1001] <<
then,
don`t forget to define x1[i] = x;
here is the script for this program
/*======================================================================linear graf data awis ver.File Name : 練習1.cVersion : 1.00Date : 2008.6.25Programed by awis85========================================================================*///------ヘッダー-------#include#include#include#include#include#include//-------変数定義--------int i; //parameterdouble x = 0.0; //X軸double y = 0.0; //Y軸double m = 0.0; //傾きdouble c = 0.0; //係数double x1[1001];double Y1[1001];//------データ入力と取り込み---------void input(void){printf("傾きを入力[1/cm]\n");scanf("%lf",&m);printf("\n");printf("定数を入力[cm]\n");scanf("%lf",&c);printf("\n");}//---データ保存---void save_data(void){char name[20];FILE *fp;printf("Input Data Name : ");scanf("%s",name);strcat (name,".dat");fp=fopen(name,"w"); //エラーメッセージif (fp==NULL){printf("File Cannot Open");exit(1);}for(i=0;i<= 100;i++){fprintf(fp,"%10.7f %10.7f\n",x1[i],Y1[i]);}fclose(fp);printf("出力終了 \n");}//----------計算ここから-----------void main(void){input();for(i=0;i<=100;i++){x = i * 1;y = (m * x) + c;x1[i] = x;Y1[i] = y;printf(" x= %lf y= %f \n",x,y);}printf("計算終了\n");save_data();}
Tuesday, July 1, 2008
#include#include// for math function and symbols #include#include//to get memory management funtion #include//memory and string functions #include// Defines structs, unions, macros, and functions for dealing with MSDOS and the Intel iAPX86 microprocessor family. //-------変数定義--------int i;double time = 0.0; //時間double x = 0.0; //変位double m = 0.0; //質量double c = 0.0; //減衰係数double k = 0.0; //バネ定数double x0 = 0.0; //初期変位double h = 0.01; //刻み幅double myu = 0.0;double x1[1000001]; //配列double T1[1000001];double p = 0.0;double y = 0.0;double fai = 0.0;double v0 = 0.0;//------データ入力と取り込み---------void torikomi(void){printf("質量を入力[kg]\n");scanf("%lf",&m);printf("\n");printf("ばね定数を入力[kg/m]\n");scanf("%lf",&k);printf("\n");printf("ダンパ定数を入力[kg/(m/s)]\n");scanf("%lf",&c);printf("\n");printf("初期変位を入力[m]\n");scanf("%lf",&x0);printf("\n");}//---データ保存---void save_data(void){char name[20];FILE *fp;printf("Input Data Name : ");scanf("%s",name);strcat (name,".dat");fp=fopen(name,"w"); //エラーメッセージif (fp==NULL){printf("File Cannot Open");exit(1);}for(i=0;i<= 10000;i++){fprintf(fp,"%10.7f %10.7f\n",T1[i],x1[i]);}fclose(fp);printf("出力終了 \n");}//----------計算ここから-----------void main(void){torikomi();i = 0;myu = c * 0.5 / m;p = sqrt(k / m);y = p*p-myu*myu;fai = atan((v0+myu*x0)/(x0*sqrt(y)));for(i=0;i<=10000;i++){time = i * h;x = exp(-myu * time) * sqrt(pow(x0,2)+pow(((v0 + myu*x0)/sqrt(y)),2))*cos(sqrt(y)*time-fai);x1[i] = x;T1[i] = time;printf("time= %lf x= %f \n",time,x);}printf("計算終了\n");save_data();}
this is the program`s language for the last week model. Actually i got this script from Razi which he got from his senior. it`s almost impossible for me to write from beginning .
Wednesday, June 18, 2008
learning C language
Subscribe to:
Posts (Atom)