Borrar filtros
Borrar filtros

Match NaN's in one Matrix to another

1 visualización (últimos 30 días)
Robert
Robert el 24 de Feb. de 2016
Respondida: the cyclist el 24 de Feb. de 2016
Consider 2 matrices
A = [1, 2, 3, 4;
5, 6, 7, 8]
B = [NaN NaN 1 1;
NaN 1 1 NaN]
How can
C = [NaN NaN 3 4;
NaN 6 7 NaN]
I can do this for an individual row or column but can't get it to work for matrix. Thanks in advance for any help

Respuesta aceptada

the cyclist
the cyclist el 24 de Feb. de 2016
C = A;
C(isnan(B)) = NaN

Más respuestas (0)

Categorías

Más información sobre Creating and Concatenating Matrices en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by