simple math with wrong results results

조회 수: 2 (최근 30일)
Opariuc Andrei
Opariuc Andrei 2021년 3월 19일
댓글: Opariuc Andrei 2021년 3월 19일
so i'm trying to reproduce some homework nothing too complicated ,simple stuff , when applying the formula for E i'm receiving 1 value 0.7018 , i tried writing the vectors P_ref and P_m as colums i ran the program again and i'm getting some weird values which i attached in an ss ,everything else gives the desired values ,if i manually do the multiplication and divisionin command window i get the desired value .What did i do wrong ?
%% input
L_et=6; % Measurement limit for the standard manometer
L_m=6; % Measuring limit for checked manometer
et=.6; % Precision class for the standard manometer
em=1.6; % Precision class for the checked manomenter
P_ref=[0.75 ; 1.5; 2.25 ; 3; 3.75; 4.5 ; 4.5; 3.75 ; 3 ; 2.25; 1.5 ; 0.75;];
P_m= [0.76; 1.55; 2.3; 3.08; 3.84; 4.58; 4.58; 3.67; 2.92; 2.18; 1.45; 0.748;]
%% calculus
disp("the maximum value of the absolute measurement error for the standard manometer e_lim_m ")
e_lim_et=L_et*(et/100);
disp(" the maximum value of the absolute measurement error for the manometer to be checked by e_lim_m ")
e_lim_m=L_m*(em/100);
disp(" absolute measurement error e ")
e=P_m-P_ref
disp(" relative measurement error E ")
E=(e/P_ref)*100
disp(" total relative measurement error Et ")
Et=(e/L_m)*100

채택된 답변

Matt J
Matt J 2021년 3월 19일
Use ./
  댓글 수: 1
Opariuc Andrei
Opariuc Andrei 2021년 3월 19일
thx , i totally forgot about the .

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Elementary Math에 대해 자세히 알아보기

태그

제품


릴리스

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by