casperyc

962 Reputation

10 Badges

17 years, 61 days
University of Kent
Dr

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are questions asked by casperyc

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`

 

Hi,

I got some Matrix problems to ask:

First,

A:=Matrix(3,4,[[1,2,3],[4,5,6]]);

it will fill with '0's

A:=Matrix(3,4,[[1,2,3],[4,5,6]],fill=8);

it will fill with '8's

B:=Matrix(3,4,[1,2,3,4,5,6]);

it will fill with '0's

B:=Matrix(3,4,[1,2,3,4,5,6],fill=8);

it does not fill

what's the proper way to do it?

Second,

A:=Matrix(3,4,[1,2,3,4,5,6]);

convert(A,listlist);

[[1, 2, 3, 4], [5, 6, 0, 0], [0, 0, 0, 0]]

 

what if I want to have ONE single list as

Hi,

I am trying to generate a non-singular Matrix.

 

> KeyMatrix:=Mod(127,RandomMatrix(n),integer);
> if Determinant(127,KeyMatrix)=0 then
> Return(KeyMatrix);
> fi;

Basically, it asks Maple to return to
KeyMatrix:=Mod(127,RandomMatrix(n),integer);
again if the current one if not invertible.

 

however, i have confused myself with RETURN and return

which is should i use?

thanks

casper
 

First 19 20 21 22 23 24 25 Last Page 21 of 31