Click here to Skip to main content
15,887,027 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: WinSock2 / Threads Pin
«_Superman_»29-Apr-10 8:04
professional«_Superman_»29-Apr-10 8:04 
GeneralRe: WinSock2 / Threads Pin
Fareed Rizkalla29-Apr-10 8:15
Fareed Rizkalla29-Apr-10 8:15 
GeneralRe: WinSock2 / Threads Pin
«_Superman_»29-Apr-10 8:22
professional«_Superman_»29-Apr-10 8:22 
GeneralRe: WinSock2 / Threads Pin
Fareed Rizkalla29-Apr-10 8:45
Fareed Rizkalla29-Apr-10 8:45 
GeneralRe: WinSock2 / Threads Pin
Fareed Rizkalla30-Apr-10 12:56
Fareed Rizkalla30-Apr-10 12:56 
QuestionRe: WinSock2 / Threads Pin
«_Superman_»30-Apr-10 13:01
professional«_Superman_»30-Apr-10 13:01 
AnswerRe: WinSock2 / Threads Pin
Fareed Rizkalla30-Apr-10 13:10
Fareed Rizkalla30-Apr-10 13:10 
QuestionProblem implementing FIR code(nuhertz) [modified] Pin
browneyes8628-Apr-10 10:26
browneyes8628-Apr-10 10:26 
i got a C code for FIR from the nuhertz filter software, am not sure if am using it correctly. i implemented it as shown below and also did a manual calculation using coeffiecients and the answers do not match at all.instead of reducing the amplitude, its the other way round. am not sure if anyone has used this before

int setic ;
	float initvar;
	for (int i = 0;i<=146; i++)

	{
		for(int z = 0;z<=8;z++)
			
		{
			
			if (z == 0)
		{
		
			setic = 1;
			initvar = raw_data[i][1];
		}

			else
			{
				setic = 2;
			}
		
			results2[i][1] = DigFil_fir(raw_data[i][1],initvar,setic) ;
		}
		
	
	
	}

float DigFil_fir(float invar,float initval, int setic)
//float invar, initval; int setic;
/******************************************************************************/
/* Filter Solutions Version 9.0                  Nuhertz Technologies, L.L.C. */
/*                                                            www.nuhertz.com */
/*                                                            +1 602-206-7781 */
/* 9 Tap Low Pass Rectangular                                                 */
/* Finite Impulse Response                                                    */
/* Sample Frequency = 12.00 Hz                                                */
/* Standard Form                                                              */
/* Arithmetic Precision = 4 Digits                                            */
/*                                                                            */
/* Pass Band Frequency = 1.000 Hz                                             */
/*                                                                            */
/******************************************************************************/
/*                                                                            */
/* Input Variable Definitions:                                                */
/* Inputs:                                                                    */
/*   invar    float       The input to the filter                             */
/*   initvar  float       The initial value of the filter                     */
/*   setic    int         1 to initialize the filter to the value of initvar  */
/*                                                                            */
/* There is no requirement to ever initialize the filter.                     */
/* The default initialization is zero when the filter is first called         */
/*                                                                            */
/******************************************************************************/
/*                                                                            */
/* This software is automatically generated by Filter Solutions.  There are   */
/* no restrictions from Nuhertz Technologies, L.L.C. regarding the use and    */
/* distributions of this software.                                            */
/*                                                                            */
/******************************************************************************/

{
    float sumnum;  int i;
    static float delay[9] = {0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0};
    static float znum[9] = {
        6.205e-02,9.553e-02,.1241,.1433,.1501,.1433,.1241,9.553e-02,6.205e-02
    };
    if (setic==1){
        for (i=0;i<=8;i++) delay[i] = 1.0*initval;
        return initval;
    }
    else{
        sumnum=0.0;
        for (i=0;i<=7;i++){
            delay[i] = delay[i+1];
            sumnum += delay[i]*znum[i];
        }
        delay[8] = invar;
        sumnum += delay[8]*znum[8];
        return sumnum;
    }
}


modified on Thursday, April 29, 2010 11:11 AM

AnswerRe: Problem implementing FIR code(nuhertz) Pin
LittleYellowBird28-Apr-10 21:59
LittleYellowBird28-Apr-10 21:59 
GeneralRe: Problem implementing FIR code(nuhertz) Pin
browneyes8629-Apr-10 2:11
browneyes8629-Apr-10 2:11 
GeneralRe: Problem implementing FIR code(nuhertz) Pin
LittleYellowBird29-Apr-10 4:27
LittleYellowBird29-Apr-10 4:27 
AnswerRe: Problem implementing FIR code(nuhertz) Pin
Stuart Dootson29-Apr-10 2:40
professionalStuart Dootson29-Apr-10 2:40 
QuestionRe: Problem implementing FIR code(nuhertz) Pin
David Crow29-Apr-10 2:48
David Crow29-Apr-10 2:48 
Questionproblem with CSplitButton::SetDropDownMenu method Pin
A&Ms28-Apr-10 9:47
A&Ms28-Apr-10 9:47 
QuestionJPEG 2 PDF Creation [modified] Pin
Game-point28-Apr-10 6:36
Game-point28-Apr-10 6:36 
QuestionRe: JPEG 2 PDF Creation Pin
David Crow28-Apr-10 7:48
David Crow28-Apr-10 7:48 
AnswerRe: JPEG 2 PDF Creation Pin
Game-point28-Apr-10 8:02
Game-point28-Apr-10 8:02 
Questionrun , show and application in my project and handle its forms Pin
iman_kh28-Apr-10 3:44
iman_kh28-Apr-10 3:44 
AnswerRe: run , show and application in my project and handle its forms Pin
Chris Losinger28-Apr-10 4:18
professionalChris Losinger28-Apr-10 4:18 
AnswerRe: run , show and application in my project and handle its forms Pin
Xeqtr28-Apr-10 7:29
Xeqtr28-Apr-10 7:29 
QuestionHow to open a file with UNICODE filename on Windows? Pin
zengkun10028-Apr-10 3:24
zengkun10028-Apr-10 3:24 
AnswerRe: How to open a file with UNICODE filename on Windows? Pin
Richard MacCutchan28-Apr-10 3:29
mveRichard MacCutchan28-Apr-10 3:29 
GeneralRe: How to open a file with UNICODE filename on Windows? Pin
zengkun10028-Apr-10 13:25
zengkun10028-Apr-10 13:25 
GeneralRe: How to open a file with UNICODE filename on Windows? Pin
Richard MacCutchan28-Apr-10 22:18
mveRichard MacCutchan28-Apr-10 22:18 
GeneralRe: How to open a file with UNICODE filename on Windows? Pin
zengkun10029-Apr-10 3:44
zengkun10029-Apr-10 3:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.