Replacing elements in a table

4 次查看(过去 30 天)
I have Table A that constitutes of arrays, Some of the columns were computed using algebraic equations. This yielded certain numbers to be Inf and -Inf
How can I remove these from A and replace them with NaNs?

采纳的回答

madhan ravi
madhan ravi 2019-3-16
A=table2array(A);
A(isinf(A)|-isinf(A))=nan;
A=array2table(A)

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Logical 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by