Adam Ledger

Mr. Adam Ledger

360 Reputation

11 Badges

8 years, 285 days
unemployed
hobo
Perth, Australia

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by Adam Ledger

@Thomas Richard 

wonderful much appreciated I can wipe the cold sweat I worked up there I'll email them now.

@tomleslie 

I'm trying to make a cipher, so I wanted to be able to read the whole file, and then split that into a character sequence, but I suppose I could use readline() in a for or while loop, that inserts a placeholder for "newline" each execution which like you said would be entirely up to me if i went this way.

@Mac Dude  Ok I'll see if the  issue persists there, I currently open maple using a .bat script that loads a "personalized" blank worksheet that reads functions and procedures I've previously written from a txt file, as well as the maple packages i always use, in the start up code. This could potentially be the reason for the issue, but I'm certainly not going to be happy about no longer using maple in the way I've described

As you noted you are already using Excel, have you considered importing from a preexisting csv file and exporting with new data rather than appending to a txt file?

Its just that I can't see anywhere in your code that maple is directly dealing with a csv file, so I'm assuming the txt file that it does make alterations to is converted to csv by an external application no?

If you type ?Import into the maple interface, then follow the link for "CSV" that appears in the list of supported formats there, you are given a few examples as to how maple can be used via importing from a pre existing csv

@mmcdara  These undeclared variables occur frequently when I use the least squares regression method, at first I thought it to be because my data sets are not sufficiently large enough, but this returns an error informing me of that in many past instances of it's use, any this is the best i have done about it, i need to start cataloging worksheets in which i encounter this error, cataloging in general is not a strong point for adams 
 

restart:

with(numtheory):

S[0] := proc (N, K) options operator, arrow; map(simplify, {seq(seq(seq(piecewise((a^varphi(b))^(1/(c+1))-floor((a^varphi(b))^(1/(c+1))) = 0, [a, b, c], NULL), a = 1 .. N), b = 1 .. N), c = 1 .. K)}, 'radical') end proc

proc (N, K) options operator, arrow; map(simplify, {seq(seq(seq(piecewise((a^numtheory:-varphi(b))^(1/(c+1))-floor((a^numtheory:-varphi(b))^(1/(c+1))) = 0, [a, b, c], NULL), a = 1 .. N), b = 1 .. N), c = 1 .. K)}, 'radical') end proc

(1)

T := proc (N, K) options operator, arrow; {seq(seq(seq([a, b, c], a = 1 .. N), b = 1 .. N), c = 1 .. K)} end proc

proc (N, K) options operator, arrow; {seq(seq(seq([a, b, c], a = 1 .. N), b = 1 .. N), c = 1 .. K)} end proc

(2)

S[1] := proc (N, K) options operator, arrow; `minus`(T(N, K), S[0](N, K)) end proc

proc (N, K) options operator, arrow; `minus`(T(N, K), S[0](N, K)) end proc

(3)

CardRatio := proc (N, K) options operator, arrow; nops(S[0](N, K))/nops(S[1](N, K)) end proc

proc (N, K) options operator, arrow; nops(S[0](N, K))/nops(S[1](N, K)) end proc

(4)

CF_LS := {
           CurveFitting[LeastSquares]([seq([k, CardRatio(2, k)], k = 1 .. 10)], K),
           CurveFitting[LeastSquares]([seq([k, CardRatio(3, k)], k = 1 .. 10)], K),
           CurveFitting[LeastSquares]([seq([k, CardRatio(4, k)], k = 1 .. 10)], K)
         }:
print~(CF_LS):

1

 

44268857/45401356-(532409481/9988298320)*K

 

24308311919/13309971675-(135902619982/773879781675)*K

(5)

{seq(CurveFitting[LeastSquares]([seq([x, CardRatio(x, k)], k = 1 .. 10)], K), x = 2 .. 10)}

{_t57[1]*K-3*_t57[1]+1238344799/1816054240, _t58[1]*K-4*_t58[1]+141249457022/164156317325, _t59[1]*K-5*_t59[1]+117716127461/139886953440, _t60[1]*K-6*_t60[1]+25996588059/31647244750, _t61[1]*K-7*_t61[1]+2856746383606823/3124961903177400, _t62[1]*K-8*_t62[1]+526810075167683/505947834121590, _t63[1]*K-9*_t63[1]+3911163142737926567/3086232651338214400, _t64[1]*K-10*_t64[1]+452305209888290788/350719651894668147, K*_t56[1]-2*_t56[1]+1}

(6)

W := map(indets, {seq(CurveFitting[LeastSquares]([seq([x, CardRatio(x, k)], k = 1 .. 10)], K), x = 2 .. 10)})

{{K, _t65[1]}, {K, _t66[1]}, {K, _t67[1]}, {K, _t68[1]}, {K, _t69[1]}, {K, _t70[1]}, {K, _t71[1]}, {K, _t72[1]}, {K, _t73[1]}}

(7)

seq((`minus`(W[y], {K}))[], y = 1 .. nops(W))

_t65[1], _t66[1], _t67[1], _t68[1], _t69[1], _t70[1], _t71[1], _t72[1], _t73[1]

(8)

about((_t65[1], _t66[1], _t67[1], _t68[1], _t69[1], _t70[1], _t71[1], _t72[1], _t73[1])[9])

_t73[1]:

  nothing known about this object

 

``

 


 

Download numtheory_mmcdara.mw

@mmcdara  thanks yes will be very helpful. Working with 2-d input is what I now consider a bad habit of mine, and it always shows itself when it comes to plotting data, using the mouse to quickly look at images for data was the only thing I used maple for initially, so unfortunately it's a difficult habit for me to break especially in the early hours of the morning

@mmcdara thanks yes I will see if the worksheet you provide works, but on the one i originally provided, the right clicking on the output labelled (5) in your worksheet provides plot options that involve two variables, K[1] and K[0], despite there only being K displayed in the output

I believe that the problem maybe resolved by loading the plots package, or manually entering the desired plot command, I was just curious as to why maple provides erraneous options when i right click on the output

@Carl Love there is a round about way... a program like OBS Studio executed in a script with the maple, and in the event of a loss of worksheet content when a termination in task manager was necessary, the problem is reduced to sifting through a .mp4 file of the screen capture.

@Carl Love  of course :-D

@Carl Love yes can you please show me how to strip only easy i don't mind the extra time of computation i can schedule those to run when i sleep

@acer Sure thanks I've managed to set maple up to load a custom blank worksheet that loads all of my preferences re custom procedures,functions and commands and the set of packages I always use, so my initial plan was just to include a maplet for importing and exporting the detailed commentary from a text file, but this is great I never expected there to be a package dedicated to it, and it would be good to do things this way in the rare event i ever produce something of interest to someone other than myself

@Carl Love

 

 

Thankyou so much this is priceless! It will be a few years before i understand the quadratic sieve properly, but at least I know I can utilize its benefits optimally in the meantime

@Carl Love  ok great but ifactor is definately inbuilt though, right? Meaning even if I went about debugging from the approach of looking at the maple code for radnormal, I am going to hit a brick wall in that as you have already made the point, the problem code will be calling the somewhat uncooperative ifactor. And moreso, it computes the factiorization in the first line with ease, but decides to be uncooperative in the second, the only difference being that it must perform an is() execution for the piecewise equality, ie the binary relation as the error states, unable to determine if it is true or false, but it just computed the exact same thing as in the first line??

And the radnormal in line two can be removed, it makes no difference.

Do you see why I might be made a little grumpy by an error statement like "in radnorml/rational/nth power"? I'll take another look.


how can i set ifactor to attempt all possible methods before giving up, and have that globalled applied to all usage of ifactor throughout the worksheet?

why do you assign the values of N_x , n_x,R_x & R_y after you have defined the functions f[1],f[2],f[3] and f[4]? would they not be greatly simplified if you assigned these values before them?

and everything below but before the fsolve line at the end seems to be completely no consequential and unrelated.

And I dont understand why you have loaded so many packages that dont appear to be used

@acer 

And I dont understand with how MTInterface has no arguments, but when you execute MTInterface() you recieve an error stating that it expects a positive integer i.e why does MTInterface(4) work but MTInterface:=proc() etc end proc

 

1 2 3 4 5 6 7 Last Page 1 of 30