if文の作り方を教えてください。
Mostrar comentarios más antiguos
if文の中の矩形波の中にX2のような矩形波を当てはめて、この矩形波と取得したYaw角(Yaw(121500:129500))の数値が近似した場合、disp('打音検査')と表示させたいのですが、近似式と取得した値が一致しているかを判断させるコードの作り方がわかりません。近似しなかった場合、次の階層に進むようにしたいのですがどうすればよいでしょうか。
x2 = 100*square(2*pi*(0.01475)*time(121500:129500));
plot(time(121500:129500),x2,'r-',time(121500:129500),Yaw(121500:129500))
% if矩形波(○)
% disp('橋面舗装、打音検査')
% else矩形波(×)
if文ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
x=142%梯子下内の閾値設定
for k=1:12
fprintf('%2.0f\n',k);
if (data6(k,8)<-15);
% 右(ピンク)
if (data6(k,11)>=300);
disp('再橋梁下内からの確認シーン')
else(data6(k,11)<300);
disp('橋梁下内からの確認シーン')
end
elseif(data6(k,8)<10 & data6(k,8)>=-15);
% 真ん中(紫)
if(data6(k,7)<=50);
disp('全景')
else(data6(k,7)>50);
disp('上流からの確認シーン')
end
else(10>data6(k,8));% 左(緑)
if(data6(k,24)<x);
disp('下流/再下流からの確認シーン')
else(data6(k,24)>=x);
% if矩形波(○)
% disp('橋面舗装、打音検査')
% else矩形波(×)
if(data6(k,23)>=3);
disp('支承と橋台裏確認')
elseif(data6(k,23)<3);
if(data6(k,2)<-60);
disp('排水装置')
elseif(data6(k,2)>=-60);
if(data6(k,8)>=40);
disp('伸縮装置')
elseif(data6(k,8)<40);
if(data6(k,24)<x+3);
disp('地ふく')
elseif(data6(k,24)>=x+3);
disp('こうらん')
end
end
end
end
end
end
end
4 comentarios
Walter Roberson
el 20 de En. de 2017
Approximate translation:
If a rectangular wave such as X2 is applied to the rectangular wave in the f sentence and the numerical value of the acquired Yaw angle (Yaw (121500: 129500)) is approximated, disp ('hammering test' ), But I do not know how to make a code to determine whether the approximate expression and the acquired value match. If I do not approximate it, I would like to go to the next level, but what should I do?
masaki yamate
el 20 de En. de 2017
Tohru Kikawada
el 23 de En. de 2017
下記の内容に関連していますでしょうか。
masaki yamate
el 23 de En. de 2017
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Exponents and Logarithms en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!