How do I decode encrypted data and plot it??
Show older comments
I have some data that is encrypted so that values <1.2V are considered logic 0 and values >2.2V are considered logic 1. The true signal is either 0V (for logic 0) or 3.3V (for logic 1), and any value above or below this threshold will include noise. I am stuck on how to get the values to stay within the threshold and how to plot the new data once it does so.
I have attached the data and my code so far but I am unsure of how to progess. Can I get any help?
time = xlsread('data.csv', 'A2:A201');
pair_1 = xlsread('data.csv', 'B2:B201');
pair_2 = xlsread('data.csv', 'C2:C201');
pair_3 = xlsread('data.csv', 'D2:D201');
pair_4 = xlsread('data.csv', 'E2:E201');
if pair_1 < 1.2
pair_1 = 0
if pair_1 > 2.2
pair_1 = 3.3
plot(time, pair_1)
end
end
Accepted Answer
More Answers (0)
Categories
Find more on Programming in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!