brian bovril

889 Reputation

16 Badges

18 years, 299 days

MaplePrimes Activity


These are questions asked by brian bovril

Hi

I have a long column vector containing data in Records.

A:=Vector[column](4, [J_K = `Record(mu = 724.901557888305, sigma = 96.7437910529146)`, I_W = `Record(mu = 775.098442111694, sigma = 96.7437910529198)`, K_J = `Record(mu = 785.098442111694, sigma = 96.7437910529198)`, D_B = `Record(mu = 764.901557888305, sigma = 96.7437910529146)`])

How to I sort this in descending values of mu so I get:

Vector[column](4, [K_J = `Record(mu = 785.098442111694, sigma = 96.7437910529198)`,I_W = `Record(mu = 775.098442111694, sigma = 96.7437910529198)`,D_B = `Record(mu = 764.901557888305, sigma = 96.7437910529146)`,J_K = `Record(mu = 724.901557888305, sigma = 96.7437910529146)`])

Im aware you can extract mu from Records by the rhs(A[1]):-mu

 

 

Hi

I've got this list:

L:=[[TC,DB], [], [TD,JK], [IW,CM], [], [KJ,DJ]]

What command to remove the 'null sets', leaving :=[[TC,DB],[TD,JK], [IW,CM], [KJ,DJ]]

this doesn't work:

remove(has, L, 0)

Hello

I'm importing some data from Excel which comes across as L:

L := Matrix(1, 6, [["TC,DB", "PC,JL", "TD,JK", "IW,CM", "CC,PG", "KJ,DJ"]])

M: = convert( L,'list' );

["TC,DB", "PC,JL", "TD,JK", "IW,CM", "CC,PG", "KJ,DJ"

map(convert, M, 'name') ; # remove inverted commas

[`TC,DB`, `PC,JL`, `TD,JK`, `IW,CM`, `CC,PG`, `KJ,DJ`]

How to I add square brackets to each pair in the output?

What I want is a command to display L or M as:

[[TC,DB], [PC,JL], [TD,JK], [IW,CM], [CC,PG], [KJ,DJ]]

 

Hello

There are 13214 days between these two dates.

with(Finance): DayCount("Jan-01-1981", "MAR-7-2017");

But how can I find the end date, given the beginning date and the days between?

This doesn't work (of course, because the date is not a number):

fsolve(DayCount("Jan-01-1981", x)=13214)

is there a direct way? in excel i would do it indirectly using Goal Seek

Experts.

I'm trying to solve a Truck Routing Problem. I set in up in Maple and Excel, but I get a smaller minimum in the spreadsheet, than in Maple. Its like as if I havn't generated enough possible routes, even though i feel i've done an exaustive search. I realise the distance matrix violates the triangle inequality.  Any suggestions....

TRP_14x3.mw

First 10 11 12 13 14 15 16 Last Page 12 of 34