How do I get rid of the horizontal line on the y-axis in a line plot? Please see attached image below as an example. I want the horizontal line hidden.

3 ビュー (過去 30 日間)
  5 件のコメント
Dyuman Joshi
Dyuman Joshi 2023 年 1 月 6 日
There might be a repetition in the data that causes this line.
Are the first and the last values same? If yes, remove the last data.
Otherwise, refer to Star Strider's answer
Mangesh KAle
Mangesh KAle 2023 年 1 月 6 日
Size of the variable is:
t1=1*962560 and x1 = 962560*2
clc;
close all;
% Read all data
[x1,fs1]=audioread('Aniruddha heart beat.wav');
t1 = (0:length(x1)-1)/fs1;
figure(1)
subplot(221)
plot(t1,y)
xlabel('time')
ylabel('x[n]')
title('Heart rate Bodytune device')
grid on

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

採用された回答

Star Strider
Star Strider 2023 年 1 月 6 日
Since:
[x1,fs1]=audioread('Aniruddha heart beat.wav');
and
x1 = 962560*2
the red line is likely the second channel in ‘x1’ so:
y = x1(:,1);
plot(t1,y)
might be the solution.
.

その他の回答 (0 件)

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by