How to Skip two Array Elements with same length?

I have 2 arrays which are the same length, but there are some elements in each array that are not given (data was not recorded). This is what I have right now. I use ~ and it is not working and just gives me one 0 when I have ~~~ (3 skipped elements). Is there anything I can use besides ~ ?
x=[1.2 2.6 2.8 6.1 6.5 ~ ~ ~ 2.1 5.86 ~ ~ 3.4]
y=[2.5 ~ 1.2 5.96 ~ ~ 2.95 3.1 0.2 3.4 5.21 9.68 1.4]

 採用された回答

Yongjian Feng
Yongjian Feng 2021 年 7 月 13 日

0 投票

Use NaN?

その他の回答 (1 件)

Steven Lord
Steven Lord 2021 年 7 月 13 日

0 投票

Often missing data is represented using NaN or missing.

カテゴリ

ヘルプ センター および File ExchangeOperators and Elementary Operations についてさらに検索

質問済み:

2021 年 7 月 13 日

コメント済み:

2021 年 7 月 13 日

Community Treasure Hunt

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

Start Hunting!

Translated by