A = [0 3 2 4 1 NaN 3 2 NaN 2 4 2 1 3 NaN 2 4 2];
How to make matrix B from A but without "NaN" like:
B = [0 3 2 4 1 3 2 2 4 2 1 3 2 4 2]; from A

 採用された回答

Arif Hoq
Arif Hoq 2022 年 11 月 10 日
編集済み: Arif Hoq 2022 年 11 月 10 日

0 投票

A = [0 3 2 4 1 NaN 3 2 NaN 2 4 2 1 3 NaN 2 4 2];
B = A(~isnan(A))
B = 1×15
0 3 2 4 1 3 2 2 4 2 1 3 2 4 2

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeResizing and Reshaping Matrices についてさらに検索

製品

リリース

R2021a

質問済み:

2022 年 11 月 10 日

編集済み:

2022 年 11 月 10 日

Community Treasure Hunt

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

Start Hunting!

Translated by