need help making a loop URGENT

1 ビュー (過去 30 日間)
Payaam Khalid
Payaam Khalid 2022 年 12 月 6 日
コメント済み: Jan 2022 年 12 月 6 日
if x>=3.3
disp('signal recevied soil is dry time to water')
elseif x>=2.9
disp('signal received soil is wet but not wet enough time to water')
disp('signal received soil is wet')
i have a moisture sensor the value of the sensor is x i have a water pump that turns on if the x>=3.3 or when x>=2.9 the x value well decrease the x value i want to make a loop that keeps running this if statement until the x value is <2.9 how do i do it
thanks in advance
  2 件のコメント
Jan 2022 年 12 月 6 日
Do not:
  1. Use words like "urgent" or "important" in your subject line


回答 (1 件)

Florian Bidaud
Florian Bidaud 2022 年 12 月 6 日
while x>= 2.9
% run your script


Find more on Food Sciences in Help Center and File Exchange


Community Treasure Hunt

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

Start Hunting!

Translated by