replacing NaN values in cell array with nearest values
조회 수: 2 (최근 30일)
이전 댓글 표시
Hi, I have a cell array with a large number of values. However there are chances of NaN either at the top or at the bottom portion (due to interpolation using previous values) . It may probably not have NaN at the bottom portion but im not sure about it. I want to replace the NaN's in the cell array at the top or bottom with the nearest values. How to do that?
댓글 수: 2
Image Analyst
2017년 5월 5일
Give a small example. Do you really need cell arrays, like because the arrays inside each cell have different lengths? Or can you use a regular numerical array instead? What forces you to use a cell array in the first place?
Guillaume
2017년 5월 5일
편집: Guillaume
2017년 5월 5일
Indeed. From your description it sounds like a matrix would be enough to hold your data, so you must be using a cell array for a reason that you've not stated. It may be that the cells contain matrices and not scalar, or some cells are empty, or something else, all of which would lead to a completely different way of solving your problem.
So as Image Analyst says, give a small example, or explain in a lot more details the structure of your cell array.
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!