JAnd

40 Reputation

5 Badges

12 years, 267 days

MaplePrimes Activity


These are replies submitted by JAnd

@acer Just did my data using Reshape() and FlipDimension(). Both took less than a tenth of a second!

I knew there must be a quick way if I just asked.

The other thing is that reading your code increases my Maple knowledge exponentially. Thanks for that.

@acer Yep, it would appear that Reshape() is the way to go. A lot quicker than the two step Convert() process.

Can I ask what does ^%T does at the end of the Reshape() command?

@acer Yep, it would appear that Reshape() is the way to go. A lot quicker than the two step Convert() process.

Can I ask what does ^%T does at the end of the Reshape() command?

@acer The vector contains integers only, which should mean a performance boost?

@acer The vector contains integers only, which should mean a performance boost?

@acer Sorry I didn't make myself clear.

In Maple the vector is of the form

V := [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]

which is a vector of 1 column and 12 rows

What I want is to convert it to a matrix of 3 rows and 4 columns

[  1  2   3]

[  4  5   6]

[  7  8   9]

[10 11 12]

I also wanted to reverse the order of the rows and I found that I needed to use FlipDimension to get

[10 11 12]

[  7  8   9]

[  4  5   6]

[  1  2   3]

Now the real vector I am using has 51840 elements and the matrix to be created is 288 x 180 in size.

On my computer, this takes a while (2-3 minutes) to create the Matrix.

Ideally the creation of the Matrix should take the minimum amount of time, but I'll have to play with some different algorithms to work out the optimum way to do it.

@acer Sorry I didn't make myself clear.

In Maple the vector is of the form

V := [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]

which is a vector of 1 column and 12 rows

What I want is to convert it to a matrix of 3 rows and 4 columns

[  1  2   3]

[  4  5   6]

[  7  8   9]

[10 11 12]

I also wanted to reverse the order of the rows and I found that I needed to use FlipDimension to get

[10 11 12]

[  7  8   9]

[  4  5   6]

[  1  2   3]

Now the real vector I am using has 51840 elements and the matrix to be created is 288 x 180 in size.

On my computer, this takes a while (2-3 minutes) to create the Matrix.

Ideally the creation of the Matrix should take the minimum amount of time, but I'll have to play with some different algorithms to work out the optimum way to do it.

@acer In this case, I have the interesting problem that the vector is in the reverse order to the way I actually want it, so ideally I need the vector in reverse order to the original and then converting to a matrix (ideas?)

The vector as it is as the moment is in the form [1,2,3,4,5,6,7,8,9,10,11,12] and I need a matrix where the first row is [1,2,3,4] 

@acer In this case, I have the interesting problem that the vector is in the reverse order to the way I actually want it, so ideally I need the vector in reverse order to the original and then converting to a matrix (ideas?)

The vector as it is as the moment is in the form [1,2,3,4,5,6,7,8,9,10,11,12] and I need a matrix where the first row is [1,2,3,4] 

 

 

Io and Earth's Moon created using the same process given by @dimensions

Say I want to plot atmospheric pressure onto a globe surface. I have a matrix of pressure measurements in boxes of longitude and latitude and I would want the boxes to vary in height (and colour) depending on the value of the pressure?
1 2 Page 2 of 2