필터 지우기
필터 지우기

How to Set whole Array column to Nan if a specific value is that column is present?

조회 수: 8 (최근 30일)
As the Questions says i want to kinda "mark" and replace all values of a column with NaNs, in which ONE of the values fullfill the following condition:
tmpTemp(:,maxTemp < minTempMeanTresh) = NaN;
minTempMeanTresh is a certain Treshhold (preset) and an array maxTemp of same size like tmpTemp (48x62) is given. If any value in one column is lower then the treshold i want to set this whole column to NaN. The code doesnt work it kinda does some repmat, which i do not understand (size is way larger). Thank u for your help!

채택된 답변

Jan
Jan 2017년 4월 10일
tmpTemp(:, any(maxTemp < minTempMeanTresh, 1)) = NaN;

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Cell Arrays에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by