dipamilo

15 Reputation

5 Badges

12 years, 71 days

MaplePrimes Activity


These are replies submitted by dipamilo

#sorry my first post, but i still need help

A := Matrix(3, 3, [1, 3, 4, 2, 3, 1, 2, 4, 1]);

B := Array([8, 6, 7]);this represent the weigth of each row in matrix A

indB := indices(B);

sort(B);

min(B);
# i´m trying to sort Array B and fix de indicies (position) like that indB`=[2],[3],[1] 
# with that information rearrange the matrix A using ind B
#the solution i wont is like that A := [2, 1], [2, 2], [2, 3], [3, 1], [3, 2], [3, 3], [1, 1], [1, 2], [1, 3] please see the order i expect.

#for that i tried two ways
#1st 

A := A[indB(() .. ())]; but didn´t work 
#2sd 

A := seq(A[i], i = indB);# work but not in order of indB´

# please help me 

i`m glad for your help, but is it possible if the function were more complicated like that:
ff:=piecewise(0<x<a,x^2+2x^3+x,a<x<xa+b,x^2+5x,a+b<x<a+b+c,4/x+5x^2)

i`m glad for your help, but is it possible if the function were more complicated like that:
ff:=piecewise(0<x<a,x^2+2x^3+x,a<x<xa+b,x^2+5x,a+b<x<a+b+c,4/x+5x^2)

1 2 Page 2 of 2