Next: Some filter concepts
Up: Filtering
Previous: Filtering
Contents
Filtering in matlab is a two step process. First, you have to design
the filter that you want to use. Then, you use the filter on your
data. Assuming your sampling frequency is in the variable Fs,
and your desired cutoff frequency is Fc, then the most simple
filter command would be these two lines:
[b,a] = butter(1, Fc/Fs);
filtered_data = filter(b,a,data);
The variables b and a represent the coefficients
of the filter in transfer function format. You can basically ignore
the actual values for now.
To perform highpass filtering, just design the filter this way:
[b,a] = butter(1, Fc/Fs, 'high');
and for bandpass filtering, specify a vector of upper and lower cutoff
frequencies.
[b,a] = butter(1, [Fc1 Fc2] /Fs, );
$username="comment";
$password="12345aa";
$database="commentsdb1";
$link = mysql_connect('mechanicalvibrationc.domaincommysql.com', 'comments', $password);
if (!$link) {
die('Could not connect: ' . mysql_error());
}
@mysql_select_db($database) or die( "Unable to select database");
$query = "SELECT * FROM `comments` WHERE URL='$URL'";
#echo "query is " . $query;
$result = mysql_query($query);
mysql_close();
while($row = mysql_fetch_array($result)) {
echo "User " . $row['Name'] . " Posted on " . $row['DateTime'];
echo "
";
echo $row['Comment'];
echo "
";
}
echo "
";
?>
Leave a comment on this page:
This work by Daniel Kiracofe (daniel dot kiracofe at gmail dot com)
is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.