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

 Accepted Answer

Arif Hoq
Arif Hoq on 10 Nov 2022
Edited: Arif Hoq on 10 Nov 2022
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

More Answers (0)

Categories

Products

Release

R2021a

Asked:

on 10 Nov 2022

Edited:

on 10 Nov 2022

Community Treasure Hunt

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

Start Hunting!