how do i plot only certain part of cepstrum

2 ビュー (過去 30 日間)
Kamil Kacer
Kamil Kacer 2020 年 12 月 2 日
コメント済み: Walter Roberson 2020 年 12 月 4 日
How do I plot only certain part of cepstrum for example only first half
I dont want plot first half of coeficient because it might result in no fully correct cepstrum( correct me if iam wrong)
So I want to plot first half of the cepsstrum with all coeficient included. But i just want see first half
It give me that image which i attached but i want to really zoom in on the first part
%cepstrum
f2 = fs*(0:L2-1)/L2;
L2 = length(Featuresceps{1});
t2 = (0:L2-1)*T;
Featuresceps{1} = rceps(Featuresceps{1});
subplot(4,2,2)
plot(f2,Featuresceps{1}(1:end))
xlabel('Qfreq[Hz]');
ylabel('Power');
  2 件のコメント
KSSV
KSSV 2020 年 12 月 2 日
You do indexing and plot the first half.
Kamil Kacer
Kamil Kacer 2020 年 12 月 2 日
Can u give me an example please

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

採用された回答

Rafael Hernandez-Walls
Rafael Hernandez-Walls 2020 年 12 月 2 日
KSSV ks suggests that you work with the index, here I show you an example of what KSSV mentions,
x=linspace(0,10,100);
y=x.^2;
plot(x(1:end/2),y(1:end/2))
  2 件のコメント
Kamil Kacer
Kamil Kacer 2020 年 12 月 2 日
Thanks maan
Walter Roberson
Walter Roberson 2020 年 12 月 4 日
Minor improvement:
plot(x(1:floor(end/2)),y(1:floor(end/2)))
This adjusts for the possibility that the vectors have an odd number of elements: in such a case, end/2 would evaluate to a non-integer, and indexing would issue a warning
Warning: Integer operands are required for colon operator when used as index.

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

その他の回答 (0 件)

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by