필터 지우기
필터 지우기

Figuring out my if statement

조회 수: 1 (최근 30일)
Zach Hanses
Zach Hanses 2021년 12월 12일
답변: Image Analyst 2021년 12월 12일
Hello everyone, I need help setting up my if statement. Im trying to find the most suitable time to plant. The conditions are: Ave precipitation for the past 7 days < 1mm and Average daily temp >2 deg C. My data for the seven day average is a 244x1 double and my data for average daily temperature is a 244x1 double aswell.
I would appreciate it if anyone can guide me through it or help me. Thank tyou

답변 (1개)

Image Analyst
Image Analyst 2021년 12월 12일
Is this homework? If not, post the data. You might try something like
goodDayIndexes = (aveTemp > 2) & (precipitation < 1)
firstIndex = find(goodDayIndexes, 1, 'first') % The first day that is good to plant.
Otherwise, if it's homework, read this:

카테고리

Help CenterFile Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by