How to do this one..??

2 views (last 30 days)
Maruti Patil
Maruti Patil on 11 Sep 2015
Commented: Maruti Patil on 11 Sep 2015
Suppose I have three numbers 6 3 and 9
I want to assign
x1=lowest number
x3=highest number
x2= remaining number
How to do this??

Accepted Answer

James Tursa
James Tursa on 11 Sep 2015
Edited: James Tursa on 11 Sep 2015
Put the numbers into a vector, sort the vector, then make assignments to your variables from this sorted vector.

More Answers (0)

Categories

Find more on Shifting and Sorting Matrices in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!