For Programmers: Free Programming Magazines  


Home > Archive > Matlab > April 2005 > I want to fileter data on runtime. please help









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author I want to fileter data on runtime. please help
Simon

2005-04-22, 4:04 pm

I want to filter my data values g on run time .
here i am trying to write a function

function [h]=rangefilter(g)

%one
h= g( g > -62 & g < -70 );

%second

if g > -62 && g < -70

h=g;
end

both are not correct.
Could some body will assisst me

Regards
simom
Cesar Garcia Atanacio

2005-04-23, 3:59 am

What's exactly your problem?

I guess 'h' is always empty...

No number can be major to -62 (like -61, -60, ...) AND minor to -70 (like -71, -72, ...).

Just:

h = g(g<-62 & g>-70);

=P
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com