how to display ranges of numbers

4 Ansichten (letzte 30 Tage)
ELISABETTA BILLOTTA
ELISABETTA BILLOTTA am 6 Mär. 2022
Beantwortet: Walter Roberson am 7 Mär. 2022
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 Kommentare
Awais Saeed
Awais Saeed am 7 Mär. 2022
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 am 7 Mär. 2022
alpha_x and beta_x are numbers .. I would just like to display for example
3 <x x <7

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 7 Mär. 2022
fprintf('%g < x < %g\n', alpha, beta) ;

Weitere Antworten (0)

Kategorien

Mehr zu Migrate GUIDE Apps finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by