how to display ranges of numbers

조회 수: 4 (최근 30일)
ELISABETTA BILLOTTA
ELISABETTA BILLOTTA 2022년 3월 6일
답변: Walter Roberson 2022년 3월 7일
I have a script like:
alpha_x = sqrt (x1-x2) / 6;
beta_x = log (x2 + x1) / 7;
epsilon_x = mean (alpha, beta);
how do i view : alpha_x < x < beta_x?
calculating the values is not a problem, I should just display the range of values, I have to display a value between the other two.
Can anyone help me?
thankssss
  댓글 수: 2
Awais Saeed
Awais Saeed 2022년 3월 7일
What do you mean by range. I do not see any range in your code but just scalers. If you are asking how to check if alpha_x < x < beta_x, then
if (alpha_x < x && x < beta_x)
% do something
end
It will be easy to answer if you tell us what are you expecting to be displayed?
ELISABETTA BILLOTTA
ELISABETTA BILLOTTA 2022년 3월 7일
alpha_x and beta_x are numbers .. I would just like to display for example
3 <x x <7

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

채택된 답변

Walter Roberson
Walter Roberson 2022년 3월 7일
fprintf('%g < x < %g\n', alpha, beta) ;

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Historical Contests에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by