Hi, I´m an absolutly matlab greenhorn. I hope its okay, if i ask some "maybe" stupid questions.
I have an array (6x2), in my example are these colums A and B, and I need an array (6x1) ... colum C.
How can I merge these two colums A and B to colum C?
Thanks for your help.
Best Regards
Example:
matlab_ex.jpg

 採用された回答

Jan
Jan 2019 年 8 月 26 日

0 投票

Assuming that X is your matrix:
C = X(:, 2);
match = isnan(C);
C(match) = X(match, 1);

1 件のコメント

René Dienemann
René Dienemann 2019 年 8 月 26 日
perfect, thanks a lot !!!

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

その他の回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by