Afficher commentaires plus anciens
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 の部分の意味を教えていただきたいです。
よろしくお願いします。
Réponses (1)
Kohei Ikeda
le 5 Avr 2023
Modifié(e) : Kohei Ikeda
le 5 Avr 2023
1 vote
if x > L/2 && temp(n - 1, 1) < L/2
この部分は2つの条件がどちらも満たしているか判定しています。
日本語でそれっぽく表現すると、
"xがL/2よりも大きい かつ temp(n - 1, 1)がL/2よりも小さい場合、"
といった文章になり、&&はこの文章において"かつ"を意味しています。
1 commentaire
恵輔 沖
le 25 Mai 2023
Catégories
En savoir plus sur データのインポートと解析 dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!