How to define the size between multiple symbolic variables and sort these symbolic elements
for example:
syms c1 c2 c3; abs(c1) >= abs(c2) >= abs(c3)
a = 1/4 – c2/4 – c3/4 – c1/4;
b = c2/4 – c1/4 + c3/4 + 1/4;
c = c1/4 – c2/4 + c3/4 + 1/4;
d = c1/4 + c2/4 – c3/4 + 1/4;
A = [a,b,c,d];
A_asc = sort(A)
Obviously, this is not the answer I wanted. The answer I want is [1/4 – c2/4 – c3/4 – c1/4,c2/4 – c1/4 + c3/4 + 1/4,c1/4 – c2/4 + c3/4 + 1/4,c1/4 + c2/4 – c3/4 + 1/4]for example:
syms c1 c2 c3; abs(c1) >= abs(c2) >= abs(c3)
a = 1/4 – c2/4 – c3/4 – c1/4;
b = c2/4 – c1/4 + c3/4 + 1/4;
c = c1/4 – c2/4 + c3/4 + 1/4;
d = c1/4 + c2/4 – c3/4 + 1/4;
A = [a,b,c,d];
A_asc = sort(A)
Obviously, this is not the answer I wanted. The answer I want is [1/4 – c2/4 – c3/4 – c1/4,c2/4 – c1/4 + c3/4 + 1/4,c1/4 – c2/4 + c3/4 + 1/4,c1/4 + c2/4 – c3/4 + 1/4] for example:
syms c1 c2 c3; abs(c1) >= abs(c2) >= abs(c3)
a = 1/4 – c2/4 – c3/4 – c1/4;
b = c2/4 – c1/4 + c3/4 + 1/4;
c = c1/4 – c2/4 + c3/4 + 1/4;
d = c1/4 + c2/4 – c3/4 + 1/4;
A = [a,b,c,d];
A_asc = sort(A)
Obviously, this is not the answer I wanted. The answer I want is [1/4 – c2/4 – c3/4 – c1/4,c2/4 – c1/4 + c3/4 + 1/4,c1/4 – c2/4 + c3/4 + 1/4,c1/4 + c2/4 – c3/4 + 1/4] sort MATLAB Answers — New Questions