casperyc

962 Reputation

10 Badges

17 years, 155 days
University of Kent
Dr

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are questions asked by casperyc

Hi,

This maybe a really simple question, I remember this is doable but couldnt find where the answer is.

Say I write a function to sum up all values in the list,

mysum:=proc(data::list)

return printf("The sum is %3.3f. ", sum(data[i],i=1..numelems(data)));

end proc;

 

and I use it like,

mysum(listA);

mysum(listB);

 

How would I print out a more informative string, like this:

"The sum of listA is %3.3f. "

"The sum of listB is %3.3f. "

 

Use "data", the input, as a string argument.

 

Thanks,

 

casper

with(LinearAlgebra):
a:=Vector([1,2]);
b:=Matrix([[1,2],[1,2]]);

Say if I need a^T * b * a, I will do this:

VectorMatrixMultiply(Transpose(a), b);
VectorMatrixMultiply(%, a);

But this seems too long for such a simple matrix (and vector) computation. I am sure there must be an short way.

What if I need more computation, like

 

a^T * b * c*d*f*g* a, where c,d,f,g are other 2x2 matrices.
 If I were to use the above command, that'll take a long time to input.

Thanks,

f:=x+y+y;

diff(f,x);
diff(f,y);
diff(f,z);

What I hope to get is a vector with i-th entry being the dervative of f, differentiated w.r.s.t the i-th parameter, like this

Vector([1,1,1]);

 

Is there a more efficient (built-in) command to do this?

 

VectorCalculus[diff] does not do what I want.

 

Thanks,

 

casper

 

Hi all,

 

Sorry if the question of the title wasn't very clear. I am not sure how to express it correctly.

But here is what I do for linux,

and I get

 

So when I submitted a lot of jobs, I can see the arguments that was passed to it. I can easily kill a process.

 

How do I do that in windows if anyone knows?

Here is a screenshot from windows task manager:

 

That does not give informative details, just like the 'top' command in linux.

 

Thanks,

Say I have

a.mpl

b.mpl

c.mpl

each of them can be ran seperately. While I am running a single file, it looks like that the machine is not "using" too much computation power. I wonder if it's possible to run multiple at the same time ?

My CPU is i7 940X, with 4 dual core processors, so it has 8 threads.

I know that the GUI can run multiple worksheets seperately, but if in one of the worksheet, i click "run all" (!!! botton),  I will have to run each line separtely by clicking one at a time.

Is there a better way to do this? What's the best way to do this? I hope to somehow 'maximize' the full use of my CPU (without changing the code).

 

casper

3 4 5 6 7 8 9 Last Page 5 of 31