RTXI 1.3
plugins/include/DSP/con_resp.cpp
Go to the documentation of this file.
00001 //
00002 //  File = con_resp.cpp
00003 //
00004 
00005 #include <stdlib.h>
00006 #include "misdefs.h"
00007 #include "con_resp.h"
00008 
00009 ContinWindowResponse::ContinWindowResponse( istream& uin,
00010                                             ostream& uout)
00011 {
00012   logical default_file_ok;
00013   
00014   uout << "shape of window?\n  "
00015        << "0 = Quit\n  "
00016        << _RECTANGULAR << " = rectangular\n  "
00017        << _TRIANGULAR << " = triangular\n  "
00018        << _HAMMING << " = Hamming\n  "
00019        << _HANN << " = Hann (hanning, vonHann)\n  "
00020        << _DOLPH_CHEBY << " = Dolph-Chebyshev\n  "
00021        << std::endl;
00022   uin >> Window_Shape;
00023   
00024   if( Window_Shape < _RECTANGULAR)
00025     { exit(0);}
00026     
00027   uout << "number of points in plot?" << std::endl;
00028   uin >> Num_Resp_Pts; 
00029   uout << "scaling?\n"
00030        << "  0 = linear, 1 = dB"  << std::endl;
00031   uin >> Db_Scale_Enab;
00032   
00033   if( Db_Scale_Enab != 0) Db_Scale_Enab = 1;
00034   
00035   uout << "default name for magnitude response output\n"
00036        << "file is cwinresp.txt\n\n"
00037        << "is this okay?"
00038        << "  0 = NO, 1 = YES"
00039        << std::endl;
00040   uin >> default_file_ok;
00041   
00042   if( default_file_ok)
00043     {
00044      Response_File = new ofstream("cwinresp.txt", ios::out);
00045     }
00046   else
00047     {
00048      char *file_name;
00049      file_name = new char[31];
00050      
00051      uout << "enter complete name for output file"
00052           << std::endl;
00053      uin >> file_name;
00054      Response_File = new ofstream(file_name, ios::out);
00055      delete []file_name;
00056     } 
00057      
00058 
00059 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines