For some reason the massflowrate doesn't change itself whenever I enter the following, no errors or anything appear. Just got no clue how to fix this.
electricalsignal=5;
massflowrate=3;
if electricalsignal==0
disp("error")
else
temperature = 200*electricalsignal-400;
end
if temperature<74;
disp("opening valves")&& massflowrate == massflowrate-50;
elseif (74<=temperature) && (temperature>=78)
disp("closing valves")
elseif temperature>78
disp("closing valves") && massflowrate == massflowrate+50;
endif
1 件のコメント
このコメントへの直接リンク
https://jp.mathworks.com/matlabcentral/answers/510826-i-would-like-to-change-the-massflowrate-when-the-statement-is-correct-could-you-help#comment_809843
このコメントへの直接リンク
https://jp.mathworks.com/matlabcentral/answers/510826-i-would-like-to-change-the-massflowrate-when-the-statement-is-correct-could-you-help#comment_809843
サインインしてコメントする。