Ältere Kommentare anzeigen
Nn = 9
for n = 1:1:Nn
x = temp(n, 1);
D = temp(n, 2); % m
t = temp(n, 3); % m
if x > L/2 && temp(n - 1, 1) < L/2
temp2(a, 1) = L/2;
temp2(a, 2) = D;
temp2(a, 3) = t;
Nc = a;
a = a + 1;
else
end
temp2(a, 1) = x;
temp2(a, 2) = D;
temp2(a, 3) = t;
a = a + 1;
end
この if x > L/2 && temp(n - 1, 1) < L/2 の部分の意味を教えていただきたいです。
よろしくお願いします。
Antworten (1)
Kohei Ikeda
am 5 Apr. 2023
Bearbeitet: Kohei Ikeda
am 5 Apr. 2023
1 Stimme
if x > L/2 && temp(n - 1, 1) < L/2
この部分は2つの条件がどちらも満たしているか判定しています。
日本語でそれっぽく表現すると、
"xがL/2よりも大きい かつ temp(n - 1, 1)がL/2よりも小さい場合、"
といった文章になり、&&はこの文章において"かつ"を意味しています。
1 Kommentar
恵輔 沖
am 25 Mai 2023
Kategorien
Mehr zu データのインポートと解析 finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!