If then question, data between a range of numbers, send an email?
조회 수: 1 (최근 30일)
이전 댓글 표시
First off, I am very new to Matlab.
So, I have a file called 20130627_SPLBRENT3_concat.mat, and within that file are several variables, such as Engine Speed, Torque, and ECU Temp. I'm trying to write a script that will read the variables within the .mat file and check if they are within a certain range of values. For example, Engine Speed (KW_ECM_Engine_Speed) has to be between 0 and 2100. I feel like the way to do this is with some sort of if-then statement. So, if the numbers within this variable are between x and x, then it's good data. If the data is not between those values, I want Matlab to send an email to me saying that the data is bad.
Does anyone know how I go about doing this?
Thanks
댓글 수: 0
채택된 답변
Sean de Wolski
2013년 6월 28일
x = rand(100,1)*2120;
if any( x > 2100 | x < 0)
sendmail()
% doc sendmail for more info
else
disp('All in range');
end
추가 답변 (1개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Web Services에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!