Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void plotStudyIteration(FILE *gPipe, vector<WTANeuron> &Neurons, point2* studyMass, int studyMassSize) {
- register int i;
- fprintf(gPipe, "unset multiplot\nset multiplot\n");
- fprintf(gPipe, "plot '-' u 1:2:3 w labels\n");
- for(i=0; i<Neurons.size(); ++i) {
- fprintf(gPipe, "%lf %lf %d\n", Neurons[i].w[0], Neurons[i].w[1], Neurons[i].index);
- }
- fprintf(gPipe, "e\n");
- fprintf(gPipe, "plot '-' u 1:2 w points ls 0\n");
- for(i=0; i<studyMassSize; ++i) {
- // if(studyMass[i].outValue == 0) {
- // fprintf(gPipe, "plot '-' u 1:2 w points ls 1\n");
- // }
- // if(studyMass[i].outValue == 1) {
- // fprintf(gPipe, "plot '-' u 1:2 w points ls 5\n");
- // }
- // if(studyMass[i].outValue == 2) {
- // fprintf(gPipe, "plot '-' u 1:2 w points ls 7\n");
- // }
- fprintf(gPipe, "%lf\t%lf\n", studyMass[i].x, studyMass[i].y);
- // fprintf(gPipe, "e\n");
- }
- fprintf(gPipe, "e\n");
- fflush(gPipe);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement