Help to verify obtained plots from .txt file data.

7 ビュー (過去 30 日間)
Angel Lozada
Angel Lozada 2023 年 5 月 19 日
コメント済み: Rik 2023 年 5 月 20 日
Hello.
I would like know if someone could help me to verify if my code and the results that I got are right regarding to plot data from .txt file.
Attached will find a zip file containing the .txt file.
Also will find a .pdf file containing:
Page 1 the expected plot and page 2 the obtained one. Here the expected and obtained one is matched. However there is a difference between page 3 (expected results) and page 4 (obtained results).
Any suggestion is more than welcome.
Here is my code
unzip('Data 2.zip'),movefile('Data 2.txt','10_03_2012_Modificado.txt')
clear;
data = readmatrix('10_03_2012_Modificado.txt');
T = data(:,1);
T2 = data(:,2);
figure; % Place "figure" in this section allow to plot this data in a separate window.
plot (T,T2,'x');
title 'Emitted Signal from NAA Station';
ylabel ('Phase');
xlabel ('Samples');
T = data(:,1);
T3 = data(:,3);
figure;
plot (T,T3,'x');
title 'Emitted Signal from NAA Station';
ylabel ('Apmlitude');
xlabel ('Samples');
Regards.
  2 件のコメント
Rik
Rik 2023 年 5 月 19 日
There doesn't really seem a difference, other than the axis limits and the fact your second plot has markers instead of a moving average line. Can you point out what is so different?
PS, please use the layout tools yourself. That way we can immediately see the results of your code, without having to open your pdf.
Angel Lozada
Angel Lozada 2023 年 5 月 19 日
Dear Rik
Thanks for your soon reply.
Regardring you question, I was thiking to obtain a plot in page 4 similar to page 3 as I got it between page 1 and 2. However, as you point out, the difference in second plot is the moving average line.
Regarding your PS, I do not know that you mean about "please use the layout tools yourself". Could you explain me please?
Regards.

サインインしてコメントする。

採用された回答

Rik
Rik 2023 年 5 月 19 日
移動済み: Rik 2023 年 5 月 20 日
You can find an explanation for the layout tools here. It is the toolbar you see when you edit your question.
How did you try to find a moving average? Both movmean (or movmedian) and conv may be useful.
  2 件のコメント
Angel Lozada
Angel Lozada 2023 年 5 月 19 日
移動済み: Rik 2023 年 5 月 20 日
Rik.
Thanks for your cooperation.
I appreciated.
I cannot see the button to accept your answer.
Regards.
Rik
Rik 2023 年 5 月 20 日
I moved my comment to the answer section, so now you should see the button. Glad to be of help.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCreating, Deleting, and Querying Graphics Objects についてさらに検索

タグ

製品


リリース

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by