List of commits:
Subject Hash Author Date (UTC)
simslope_c: Output to file f8c52e106738ec13223144579d2b74aa0d290ade Josiah_Mullins_E6440 2019-12-06 17:41:09
simslope.c: type change 707e5be5af137023c28c12d54af35394cc32c9cc Josiah_Mullins_Optiplex_Mini 2019-12-01 22:21:44
Indentation 8606ab9f5e9d3b01f698a3303f5e6d39418b7bd5 Josiah_Mullins_Optiplex_Mini 2019-12-01 21:41:16
Simslope Initial commit. e9ccd3d49b4b1342341f1866a3f7a941af503b30 Josiah_Mullins_Optiplex_Mini 2019-12-01 21:24:04
Commit f8c52e106738ec13223144579d2b74aa0d290ade - simslope_c: Output to file
Changed simslope.c to dump the data to simslope.dat
instead of stdout.
Author: Josiah_Mullins_E6440
Author date (UTC): 2019-12-06 17:41
Committer name: Josiah_Mullins_E6440
Committer date (UTC): 2019-12-06 17:41
Parent(s): 707e5be5af137023c28c12d54af35394cc32c9cc
Signing key:
Tree: 83f3e671e55cdb0b3c2435351d8e080009c5f354
File Lines added Lines deleted
00_simslope/simslope.c 12 3
File 00_simslope/simslope.c changed (mode: 100644) (index ed16c04..0815edc)
... ... int main(void)
107 107 int d,slope; int d,slope;
108 108 double base,n,step; double base,n,step;
109 109
110 FILE* fp = fopen("simslope.dat","w");
111 if(fp == NULL)
112 {
113 puts("Unable to open simslope.dat");
114 return -1;
115 }
116
110 117 init_generators(0); init_generators(0);
111 118
119
112 120 for (j=0; j<DATA; j++)//This loop generates {$DATA} datasets for (j=0; j<DATA; j++)//This loop generates {$DATA} datasets
113 121 { {
114 122 n=normal_rand(); n=normal_rand();
 
... ... int main(void)
116 124 else slope=1; else slope=1;
117 125 n=normal_rand(); n=normal_rand();
118 126 base=n*100.0+500.0; base=n*100.0+500.0;
119 printf("%d\t%d",(slope == -1 ? 0 : 1),(int)base);
127 fprintf(fp,"%d\t%d",(slope == -1 ? 0 : 1),(int)base);
120 128 for (d=1; d<SAMPLES_PER_DATA; d++)//This loop gnereates datasets of size {$SAMPLES_PER_DATA}. for (d=1; d<SAMPLES_PER_DATA; d++)//This loop gnereates datasets of size {$SAMPLES_PER_DATA}.
121 129 { {
122 130 n=normal_rand(); n=normal_rand();
123 131 step=n*3.0+(double)slope*2; /* 3.0 => low noise, 10.0 => high noise */ step=n*3.0+(double)slope*2; /* 3.0 => low noise, 10.0 => high noise */
124 132 base+=step; base+=step;
125 printf("\t%d",(int)base);
133 fprintf(fp,"\t%d",(int)base);
126 134 } }
127 printf("\n");
135 fprintf(fp,"\n");
128 136 } }
137 fclose(fp);
129 138 return 0; return 0;
130 139 } }
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/ORpKTKoVQnFhs/Public_Research

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/ORpKTKoVQnFhs/Public_Research

Clone this repository using git:
git clone git://git.rocketgit.com/user/ORpKTKoVQnFhs/Public_Research

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main