Replace the numbers in an array

조회 수: 1 (최근 30일)
Anna Sidiropoulou
Anna Sidiropoulou 2021년 1월 11일
답변: James Tursa 2021년 1월 11일
Hello, I have an array like
A[ ]: B[ ]:
-nan 2.1
0.63 4.2
-nan 2.8
-nan
0.35
1.2
-nan
and I need to replace only the numbers with the numbers of a second array B[ ]. Could you help me?

답변 (1개)

James Tursa
James Tursa 2021년 1월 11일
A(~isnan(A)) = B;

카테고리

Help CenterFile Exchange에서 Characters and Strings에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by