Merge two colums into one
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
René Dienemann
le 26 Août 2019
Commenté : René Dienemann
le 26 Août 2019
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:
0 commentaires
Réponse acceptée
Jan
le 26 Août 2019
Assuming that X is your matrix:
C = X(:, 2);
match = isnan(C);
C(match) = X(match, 1);
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Loops and Conditional Statements dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!