casperyc

4 years, 116 days


These are questions asked by casperyc

myf:=(mu,sigma)->int(exp(-(x-mu)^2/2/sigma^2)/sigma/sqrt(2*Pi)/(1+exp(-x)),x=-infinity..infinity);

plot3d('myf(mu,sigma)',mu=-5..5,sigma=0.5..10);

This plot was never created. I think it's taking too long to evaluate it when it's divegent.

 

Hi all,

For my research purpose, I need to integrate this function. I understand that there maybe values for which this integration is divegent. But is there a way to look into it? Say creat...

Hi all,

I am now helping with the first year maple session in my university. Recently, some of the student are learning both 1-d and 2-d input.

Now we have something like this:

 

Is this some sort of bug?

I know it has something to do with the 1-d or 2-d or math input, but in short, that's what happens.

Thanks!

Dear all,

I wrote some simple functions in Maple 13, called "myproc" file,

and used startup code (edit-->startup code) to initialize it in a worksheet by: read "myproc";

Now I am using Maple 14, it does not work, says, "unable to read", sort of thing.

 

I have also tried to rename the file to myproc.m and read "myproc.m";

does not work either.

Is there any compatibility problem?

Thanks.

casper

poi:=x->exp(-0.2225)*0.2225^x/x!;

 

for i from 0 to 4 do > evalf(poi(i)*10000,2) > od;

 

View 7845_Q1.mw on MapleNet or Download 7845_Q1.mw
View file details

 

I dont understand what's the 'label' thing in the answer here.

 

Thanks.

 

casper

Hi,

++++++++++++++++++

A:=Matrix(3,3);

 

ExportMatrix("A",A);

 

save A,A2;

++++++++++++++++++

 

Both 'A' and 'A2' are saved  in the same folder as the worksheet,

how can I save/ExportMatrix in a sub-folder (if folder dose not exists, creat automatically)?

 

 

Thanks.

 

casper

Download 7845_notes.pdf
View file details

Hi,

I am trying to go through an example in my notes.

p:=2038074743;
q:=1190494759;
n:=p*q;

x:=141213562373095048;

y:=Power(x,2) mod n;

 

then I do the following,

Power(y,(p+1)/4) mod p;

map VS subsop

November 06 2009 by casperyc 707 Maple

0

3

Hi,

I am just wondering, if dealing with 'large' numbers,

which one is better? or which is approiate?

+++++++++++++++++++++++++++

restart:
a:=[12,34,56,78,100000];
t:=time():map(i->Power(i,43214342341) mod 5423524532,a);time()-t;
+++++++++++++++++++++++++++

restart:

a:=[12,34,56,78,100000];

t:=time():
for i to nops(a) do
a:=subsop(i = `mod`(Power(a[i],43214342341),5423524532),a):
od:
a;time()-t;

+++++++++++++++++++++++++++

loop to save file problem (cat command)

November 01 2009 by casperyc 707 Maple

0

1

Hi,

Have a look at the following

+++++++++++++++++++++++++++++

test:=proc(s::string)
local M,a;
a:=rand(10..100)();
M:= Matrix([a-1,a,a+1]);
ExportMatrix(cat("Matrix_",s),M);
end proc;

+++++++++++++++++++++++++++++

test("1");test("2");test("3");test("4");test("5");test("6");

+++++++++++++++++++++++++++++

it saves in file

Matrix_1, Matrix_2,Matrix_3 .....Matrix_6

 

however,

deleting some values in list

October 23 2009 by casperyc 707 Maple

Hi there,

B:=Matrix(3,4,[ListTools:-LengthSplit([1,2,3,4,5,6],4)],fill=32);

C:=[seq(i,i=B^%T)];

What's the most efficient way to delete the 'extra' 32s when converting it back?

Thanks.

 

casper

Hi,

The aim is simple. For some defined procedures, I would like to load them with one single line, and show the 'welcome' message, then be able to use the procedures.

Download 7845_test.zip
View file details

============================

In 'hello' file,

ExportMatrix/ImportMatrix

October 19 2009 by casperyc 707 Maple

0

2

Hi,

How can I ExportMatrix/ImportMatrix without specific column(s)?

say I want to ExportMatrix(M,filename) without the last column?

Thanks.

casper

redefine some error

October 19 2009 by casperyc 707 Maple

Hi,

errors such as

"Error, (in ImportMatrix) file or directory does not exist"
"Error, Matrix index out of range"

can I redefine the error message in a procedure?

say if "Error, (in ImportMatrix) file or directory does not exist" happens,

I want it to printf("You have not got the message yet.")

Generally, what shall I be looking for in the help in Maple?

 

Thanks.

casper

Hi,

 

myproc:=proc(name)
local i;
i:=10;
save i,"i_name";
end proc;

myproc(bob);

basically, I want to save the value i in the file that has name i_bob in this case.

how should I do that?

and dose it work the same way with Matrix? say I would like to Export a Matrix with name Matrix_bob, (or whatever I input in the myproc proceudre? )

 

Thanks.

 

Hi,

How can I read a file that has " in the context correctly? (see the attached file)

Download 7845_not_good.txt
View file details

> read "notgood.txt";

Warning, incomplete quoted name;  use ` to end the name

on line 1, unexpected end of input

Error, while reading `notgood.txt`

 

1 2 3 4 5 Page 1 of 5