Question

Frequency Shaping Filters There are many applications of frequency shaping filters including audio systems in which systems p

Data File from excel

Date Open High Low Close Adj Close Volume
2019-02-25 111.76 112.18 111.26 111.59 110.1329 23750600
2019-02-26 111.26 113.24 111.17 112.36 110.8928 21536700
2019-02-27 111.69 112.36 110.88 112.17 110.7053 21487100
2019-02-28 112.04 112.88 111.73 112.03 110.5671 29083900
2019-03-01 112.89 113.02 111.67 112.53 111.0606 23501200
2019-03-04 113.02 113.25 110.8 112.26 110.7941 26608000
2019-03-05 112.25 112.39 111.23 111.7 110.2414 19538300
2019-03-06 111.87 112.66 111.43 111.75 110.2908 17687000
2019-03-07 111.4 111.55 109.87 110.39 108.9485 25339000
2019-03-08 109.16 110.71 108.8 110.51 109.067 22818400
2019-03-11 110.99 112.95 110.98 112.83 111.3567 26491600
2019-03-12 112.82 113.99 112.65 113.62 112.1364 26132700
2019-03-13 114.13 115 113.78 114.5 113.0049 35513800
2019-03-14 114.54 115.2 114.33 114.59 113.0937 30763400
2019-03-15 115.34 117.25 114.59 115.91 114.3965 54681100
0 0
Add a comment Improve this question Transcribed image text
Answer #1

MATLAB code is given below in bold letters.

clc;
clear all;
close all;

% load the data
load moddle.txt;

% read the data
Open = moddle(:,1);
High   = moddle(:,2);
Low   = moddle(:,3);
Close   = moddle(:,4);
Adj_Close = moddle(:,5);
Volume = moddle(:,6);

% % define the filter 2 point
% b2 = [1/2 1/2];a2=1;

% define the filter 4 point
b4 = [1/4 1/4 1/4 1/4];a4=1;

% obtain the filtered outputs
open_filtered = filter(b4,a4,Open);
High_filtered = filter(b4,a4,High);
Low_filtered = filter(b4,a4,Low);
Close_filtered = filter(b4,a4,Close);
Adj_Close_filtered = filter(b4,a4,Adj_Close);
Volume_filtered = filter(b4,a4,Volume);


% plot the original and filtered
figure;
subplot(231);
plot(1:length(Open),Open,1:length(open_filtered),open_filtered);
legend('original','4-point filter');title('Open');


subplot(232);
plot(1:length(High),High,1:length(High_filtered),High_filtered);
legend('original','4-point filter');title('High');


subplot(233);
plot(1:length(Low),Low,1:length(Low_filtered),Low_filtered);
legend('original','4-point filter');title('Low');

subplot(234);
plot(1:length(Close),Close,1:length(Close_filtered),Close_filtered);
legend('original','4-point filter');title('Close');

subplot(235);
plot(1:length(Adj_Close),Adj_Close,1:length(Adj_Close_filtered),Adj_Close_filtered);
legend('original','4-point filter');title('Adj_Close');

subplot(236);
plot(1:length(Volume),Volume,1:length(Volume_filtered),Volume_filtered);
legend('original','4-point filter');title('Volume');


Open High Low -original – 4-point filter original 4-point filter original 4-point filter 108 106 100 2 4 6 8 10 12 14 10 15 2

Add a comment
Know the answer?
Add Answer to:
Data File from excel Date Open High Low Close Adj Close Volume 2019-02-25 111.76 112.18 111.26...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT