Changeset 1938 in Sophya
- Timestamp:
- Mar 14, 2002, 5:41:09 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PIext/basexecut.cc
r1917 r1938 476 476 // >>>>>>>>>>> Trace de fonctions 477 477 else if ( (kw == "func") ) { 478 if (tokens.size() < 4) { cout << "Usage: func f(x) xmin xmax npt [opt]" << endl; return(0); } 479 string opt = ""; 478 if(tokens.size()<3) {cout<<"Usage: func f(x) xmin xmax [npt opt]"<<endl; return(0);} 479 int np = 100; 480 double xmin=0., xmax=1.; 481 string opt = "", nom = ""; 482 xmin = atof(tokens[1].c_str()); xmax = atof(tokens[2].c_str()); 483 if (tokens.size() > 3) np = atoi(tokens[3].c_str()); 480 484 if (tokens.size() > 4) opt = tokens[4]; 481 int np;482 double xmin, xmax;483 np = 100;484 xmin = 0.; xmax = 1.;485 np = atoi(tokens[3].c_str());486 xmin = atof(tokens[1].c_str()); xmax = atof(tokens[2].c_str());487 string nom = "";488 485 mObjMgr->GetServiceObj()->PlotFunc(tokens[0], nom, xmin, xmax, np, opt); 489 486 } 490 487 else if ( (kw == "funcff") ) { 491 if (tokens.size() < 5) { cout << "Usage: funcff C-filename f(x)-name xmin xmax npt [opt]" << endl; return(0); } 492 string opt = ""; 493 if (tokens.size() > 5) opt = tokens[5]; 494 int np; 495 double xmin, xmax; 496 np = 100; 497 xmin = 0.; xmax = 1.; 498 np = atoi(tokens[4].c_str()); 499 xmin = atof(tokens[2].c_str()); xmax = atof(tokens[3].c_str()); 500 string nom = ""; 488 if (tokens.size()<4) {cout<<"Usage: funcff C-filename f(x)-name xmin xmax [npt opt]"<<endl; return(0);} 489 int np = 100; 490 double xmin=0., xmax=1.; 491 string opt = "", nom = ""; 492 xmin = atof(tokens[2].c_str()); xmax = atof(tokens[3].c_str()); 493 if(tokens.size()>4) np = atoi(tokens[4].c_str()); 494 if(tokens.size()>5) opt = tokens[5]; 501 495 mObjMgr->GetServiceObj()->PlotFuncFrCFile(tokens[0], tokens[1], nom, xmin, xmax, np, opt); 502 496 } … … 1047 1041 kw = "func"; 1048 1042 usage = "Displays a function y=f(x) (Fills a vector with function values)"; 1049 usage += "\n Usage: func f(x) xmin xmax npt [graphic_attributes]";1043 usage += "\n Usage: func f(x) xmin xmax [npt graphic_attributes]"; 1050 1044 usage += "\n Related commands: funcff func2d func2dff "; 1051 1045 mpiac->RegisterCommand(kw, usage, this, "Func Plot"); 1052 1046 kw = "funcff"; 1053 1047 usage = "Displays a function y=f(x) from a C-file (Fills a vector with function values)"; 1054 usage += "\n Usage: funcff C-FileName FunctionName xmin xmax npt [graphic_attributes]";1048 usage += "\n Usage: funcff C-FileName FunctionName xmin xmax [npt graphic_attributes]"; 1055 1049 usage += "\n Related commands: func func2d func2dff "; 1056 1050 mpiac->RegisterCommand(kw, usage, this, "Func Plot");
Note:
See TracChangeset
for help on using the changeset viewer.