Click here to Skip to main content
15,922,315 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: MFC Grid control 2.26 Pin
capint16-May-08 23:14
capint16-May-08 23:14 
GeneralRe: MFC Grid control 2.26 Pin
Hamid_RT16-May-08 23:35
Hamid_RT16-May-08 23:35 
QuestionCapturing CAPS key changes and updating UI Pin
Member 26088015-May-08 5:26
Member 26088015-May-08 5:26 
AnswerRe: Capturing CAPS key changes and updating UI Pin
led mike15-May-08 5:56
led mike15-May-08 5:56 
AnswerRe: Capturing CAPS key changes and updating UI Pin
David Crow15-May-08 6:59
David Crow15-May-08 6:59 
QuestionHow to displaybitmap on second monitor? Pin
Soumyadipta15-May-08 5:24
Soumyadipta15-May-08 5:24 
QuestionApply a Low Pass filter on data with irregular time stamp Pin
jeremie.delaitre15-May-08 5:14
jeremie.delaitre15-May-08 5:14 
AnswerRe: Apply a Low Pass filter on data with irregular time stamp Pin
Nelek15-May-08 6:04
protectorNelek15-May-08 6:04 
I don't understand your problem very well, but a low pass filter doesn't need to be so periodical (at least the analogic ones), it just check the values and if the data/frecuency of the signal is bigger than the cutoff value, then it does nothing, otherwise block it.

In grosso modo it should be like (assuming you are getting the data from a file... doing in a loop till you read all the values you have):

go to the beggining of the data
do
{
   read data
   if (data <= cutoff_value)
   {   go one position foward;
       continue;   //it doesn't read further and goes directly to the next iteration of the loop
   }
   else
   {
       do whatever you want to do with the values that passed the filter;
   }

   go one position foward;
}
while (data not ended)


But if you are just want to call the function in the moment you make a data aquirement you can use a function like...

bool apply_filter (cutoff_value, read_data)
{
   if (read_data > cutoff_value)
   {   do whatever you want;
       return TRUE; //given data passed the filter
   }


   return FALSE;   //given data didn't pass the filter
}


is it what you were asking? If not, please explain yourself better.

Greetings.
--------
M.D.V. Wink | ;)

If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson

GeneralRe: Apply a Low Pass filter on data with irregular time stamp Pin
jeremie.delaitre15-May-08 21:10
jeremie.delaitre15-May-08 21:10 
GeneralRe: Apply a Low Pass filter on data with irregular time stamp Pin
Nelek16-May-08 1:19
protectorNelek16-May-08 1:19 
GeneralRe: Apply a Low Pass filter on data with irregular time stamp Pin
jeremie.delaitre16-May-08 1:59
jeremie.delaitre16-May-08 1:59 
QuestionDifference between similar calls Pin
ilgale15-May-08 5:01
ilgale15-May-08 5:01 
AnswerRe: Difference between similar calls Pin
Nelek15-May-08 5:57
protectorNelek15-May-08 5:57 
AnswerRe: Difference between similar calls Pin
Matthew Faithfull15-May-08 6:13
Matthew Faithfull15-May-08 6:13 
Questionproblem to use java class from vc++ Pin
intermediate15-May-08 4:13
intermediate15-May-08 4:13 
AnswerRe: problem to use java class from vc++ Pin
CPallini15-May-08 4:21
mveCPallini15-May-08 4:21 
QuestionRe: problem to use java class from vc++ Pin
Nelek15-May-08 5:52
protectorNelek15-May-08 5:52 
QuestionRe: problem to use java class from vc++ Pin
CPallini15-May-08 6:01
mveCPallini15-May-08 6:01 
AnswerRe: problem to use java class from vc++ Pin
intermediate15-May-08 18:13
intermediate15-May-08 18:13 
GeneralRe: problem to use java class from vc++ Pin
CPallini15-May-08 21:00
mveCPallini15-May-08 21:00 
QuestionHash table source code [modified] Pin
fawadnasim15-May-08 3:28
fawadnasim15-May-08 3:28 
QuestionCan a dll understand which program calls it. Pin
maxMESA15-May-08 3:04
maxMESA15-May-08 3:04 
AnswerRe: Can a dll understand which program calls it. Pin
Matthew Faithfull15-May-08 3:15
Matthew Faithfull15-May-08 3:15 
QuestionRTTI problem Pin
Karismatic15-May-08 2:53
Karismatic15-May-08 2:53 
GeneralRe: RTTI problem Pin
Matthew Faithfull15-May-08 3:09
Matthew Faithfull15-May-08 3:09 

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.