create a loop function for temperature and the heater

5 ビュー (過去 30 日間)
Unkown
Unkown 2021 年 8 月 11 日
コメント済み: Image Analyst 2021 年 8 月 12 日
for example i have this code:
%setpoint (degC)
t1_sp = 35;
for i = 1:399
tic;
if i==5
disp('Turn on heater 1')
ht1 = 100;
ht2 = ht1;
h1(ht1);
h2(ht2);
end
the heater will start to turn on after 5 seconds until it reach the setpoint temperature. i want the heater to slowly increase from 0 until it reach the setpoint.
  3 件のコメント
Unkown
Unkown 2021 年 8 月 12 日
i want to maintain the temperature at certain point and at the same time dont need the heater to turn off.
% On Off Control
if temp > setpoint
heater1 = 0;
else
heatert1 = 100;
end
h1(ht1);
Image Analyst
Image Analyst 2021 年 8 月 12 日
pause(5); % Wait 5 seconds before continuing.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeCall C++ from MATLAB についてさらに検索

製品


リリース

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by