How to count the total interruption?

figure(1)
plot(a,b,'r*','Markersize',1);
xlabel('Epoch')
ylabel('PRN')
title('Satellite Visibility from Javed Receiver 1');
Hello
I have plot a signal in which i am getting some interruption. Plot is of total number of visible satellite on y-axis and total number of epoch on x-axis. So I am getting graph as attached.

4 件のコメント

Adam Danz
Adam Danz 2020 年 4 月 30 日
My guess is that you've got NaN values. You can count the number of NaN values:
sum(isnan(x))
vimal kumar chawda
vimal kumar chawda 2020 年 4 月 30 日
figure(1)
plot(a,b,'r*','Markersize',1);
xlabel('Epoch')
ylabel('PRN')
title('Satellite Visibility from Javed Receiver 1');
In the above case , How can I count it. As you can see the plot and the data in a and b array.
Adam Danz
Adam Danz 2020 年 4 月 30 日
The variables you're plotting are 'a' and 'b'. Check for NaN values in both using isnan().
vimal kumar chawda
vimal kumar chawda 2020 年 5 月 1 日
There is no gap or NaN in the data so it is difficult plot it.
How can I do it and please find the attachement of a and b ? I think you are giving my right direction and I am not able to fidure it out.

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

回答 (1 件)

KSSV
KSSV 2020 年 5 月 1 日

0 投票

There are no NaN's in the data. To get the breaks/ interruption you can get the successuve distances and find the ditances which are greater then the resolution.
a, b are your point arrays.
da = diff(a) ;
db = diff(b) ;
d = sqrt(da.^2+db.^2) ;
iwant = nnz(d>1) ; % I assume if the points are continuous the distance should be 1.

カテゴリ

ヘルプ センター および File ExchangeReference Applications についてさらに検索

製品

リリース

R2020a

質問済み:

2020 年 4 月 30 日

回答済み:

2020 年 5 月 1 日

Community Treasure Hunt

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

Start Hunting!

Translated by