protrader

409 Reputation

7 Badges

17 years, 61 days

MaplePrimes Activity


These are questions asked by protrader

I want to build a sequence with random step between numbers, the first number must be 0 and the last must be 10, for example:

No of numbers 6

[0,2,3,6,9,10]

seq function does not allow rand function, is there any other way?

I have a vector and after some manipulation, some of its values are rational and some are decimal with fixed 10 digits after decimal point which is default for maple 13, I want to show all of them in decimal numbers with no zeros, e.g.

[1.1000000000, 2/3, 2.3150000000,10.0000000000]

 

is there any way to do this?

Is there any function that we can sort a list / vector?

What abt a matrix? e.g.

M:=Matrix([[2, 5], [4, 0], [3, 9]]);

The sorted matrix (based on its first column) will be:

Matrix([[2, 5], [3, 9],[4, 0]]);

restart:
with(LinearAlgebra):
A:=RandomMatrix(3,2, generator=1..3);

                               [1   1]
                               [       ]

> A:=Matrix([[1,2,2,3],[5,1,0,4],[6,7,3,4]]);
> V:=<6,5,9>;
                            

I want to add vector V as a new column [e.g. 3rd column] in matrix A, is there any function to do that simply? What abt to add as a row?

2 3 4 5 6 7 Page 4 of 7