## 962 Reputation

16 years, 171 days
University of Kent
Dr

## The differences between two sequences...

Maple 18

restart:
seq1:=seq(i,i=1..5);
seq2:=seq(i,i=2..6);
dseq:=seq2-seq1;
seq1:=seq(i,i=1..5);
seq2:=seq(i,i=1..5);
dseq:=seq2-seq1;
seq1:=[seq(i,i=1..5)];
seq2:=[seq(i,i=1..5)];
dseq:=seq2-seq1;

Is that possible to get the differences between two sequences directly? (instead of using a list)

I don't quit understand why the second method would collapse the 0s into just a single value. It's not a set.

Thanks,

casper

## Maple and Matlab - Global Optimization t...

Hi,

On page 32 （PDF）

Two different results were obtained using the Global optimization.

Log likelihood does not differ much. BUT the estimates vary a lot, such as mu[p].

tmp.mw

tmp.pdf

When I tried to use one of the answer from a particular run, I get the HFLOATING error, see picture.

So how reliable is this? Could there be a better way to optimize this ?

Thanks!

As an additional note, if I have Matlab R2014a, could I use Matlab to optimize the target function? DO I need to purchase a seperate addon?

## Solving symbolic/numerical simultaneous ...

Maple 18

Hi,

I need to solve systems of numerical equations. I encountered a problem, where one of the parameters (tau[p3]) become FREE, see Maple worksheet attached.

That was clearly not expected.

I spent about 40 mintues to inspect what the problem is, eventually, I find that fsolve works perfectly.

Though fsolve would be the "first" choice for solving floating point problems. I really dont see why the simple "solve" syntax can not work. It is acting strange. And why is *tau[p3]*  FREE, not the others?

Could this be a bug? Or maybe is just WRONG to use solve?

Casper

solve-fsolve.mw

## Matrix and parallel computing / multicor...

Maple 18

Hi,

Is there any difference between

Matrix(4,5,(K,C)->K+C);

and

Array(1..4,1..5,(K,C)->K+C);

Say if I have a very 'complicated' procedure myfunc(K,C) that takes two options, but it runs all dependently.

Matrix(4,5,(K,C)->myfunc(K,C));

and

Array(1..4,1..5,(K,C)->myfunc(K,C));

Which one is more efficient? The final ouput of each run from myfunc is just a integer value.

The reason I am asking it that i think both runs on a 'single' thread (core) as CPU usage is always very low, around 15-20%.

If I look at the task manager, some cores (threads) arent doing anything.

Is there anyway to speed things up?

Thanks,

## cat a subscript also as an input from a ...

Maple 18

f:=C->sum(x[cat(new,c)],c=1..C);

f(4) # does not give me what i want , which is

x[cat(new,1)]+x[cat(new,2)]+x[cat(new,3)]+x[cat(new,4)];

seq(x[cat(new,c)],c=1..4);
convert([%],`+`);

This works. But it's just a simple example to illustrate my problem.

Is there a way to fix this 'cat' problem in the procedure 'f'?

Thanks,

casper

 First 6 7 8 9 10 11 12 Last Page 8 of 31
﻿