casperyc

962 Reputation

10 Badges

16 years, 78 days
University of Kent
Dr

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are questions asked by casperyc

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;

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

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,

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,

Hi,

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

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

Thanks.

casper

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