Melvin Brown

79 Reputation

6 Badges

13 years, 326 days

Social Networks and Content at Maplesoft.com

Maple Application Center

MaplePrimes Activity


These are questions asked by Melvin Brown

I have converted a single large worksheet into a workbook comprising many worksheets.  One of the worksheets contains start-up code.  Is that start-up code (which includes numerous subroutines/functions) automatically available/accessible/executable by all the other worksheets in the workbook?  

Melvin

 

I have a worksheet that creates many dynamic GIF images.  They use up a huge large amount of RAM, causing MAPLE to grind to a halt.

Instead, on its creation, I would like to export each image file to my external file system, and then delete it from my MAPLE worksheet.  I wish then to use commands in MAPLE to start up and view the image files using IrfanView outside MAPLE.  This would, significantly reduce my RAM usage. (I.e. I wish to export the iGIF mage viewing to IrfranView.)

Can anyone help please?  (I have tried to follow MAPLE documentation, but have been unable find a working solution.)

I am running under Windows 7.

MRB

with(Statistics):

LetList := [C, E, F, H, K, P, T, W, X, Y]; LetList[Sample()];
           LetList := [C, E, F, H, K, P, T, W, X, Y]
Error, invalid input: no implementation of Sample matches the arguments in call, 'Sample:-ModuleApply()'

Can any one help me with random sampling from LetList ?

 

Melvin


 

I wish to add tick marks to a 3D plot of a matrix.

B:=Matrix(10, 10, [[0, 0, 0, 0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0, 0, 1, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 1, 0], [0, 0, 0, 0, 0, 0, 1, 0, 0, 0], [1, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, 0, 0, 0, 0, 0], [0, 1, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 1, 0, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0, 0, 0, 0], [0, 0, 1, 0, 0, 0, 0, 0, 0, 0]]):

Below, I draft a plot of this adjacency matrix B . I have adjusted  the position of the domain graph ticks for the x and y axes to be letters at the midpoints of the matrix elements:

tickList := [1.5 = "W", 2.5 = "P", 3.5 = "K", 4.5 = "C", 5.5 = "Y", 6.5 = "F", 7.5 = "X", 8.5 = "H", 9.5 = "T", 10.5 = "E"];

tickmarks = [tickList, tickList, tickList];

matrixplot(B, axes = [0 .. 12, 0 .. 12, 0 .. 12], heights = histogram, axes = boxed, title = "Above adjacency matrix B - axis order 1-10 \n Basis set: {W,P,K,C,Y,F,X,H,T,E}", labels = ["from", "to", ""], orientation = [0, 0, 0], tickmarks = [tickList, tickList, tickList]);

BUT I would like the z-axis not to be the above letters but instead the real (or integer) values of the matrix elements.  How should I do this, while retaining the x and y axes labels as letters located at the ticklist above.

Please can someone help?

Melvin

Am trying to analyse a set of strings.   Can anyone help?

We have 10 x10 matrix into which we need to add connection score.
ExY := [WPKCPYWFYWCXHY, WPKCTEYFHCFEEE, HYCYTFHYYWWKCE, HYHHTFHKFEYHEH, HKXWYHFECTFFTF, HKWEHPPECWWHTC, HKXWYTPXHFHWYP, HKFEXCTFECXFKP, HKFEYPPEEEPHYW, HYTHCCFEWPPEXX, HKXKXCKFCHTEWK, HYEKPPCKFTWXXW];
Here is the code to create the connection matrix 
A__c = A__a+A__d;
.
Blist:=[W,P,K,C,Y,F,X,H,T,E]:# basis letters
nWords:=numelems(ExY):Wletters:=length(ExY[1]):Bletters:=numelems(Blist):A:=Matrix(Bletters,Bletters):# set up dimensions
for iW from 1 to nWords do  # loop through words
  for iL from 1 to Wletters-1 do # loop through letters of each word
     fromLett:=C(iW,iL); # see char extraction from ExY list above 
     toLett:=C(iW,iL+1); # ditto
     BfromLett:=Search(fromLett,Blist);# column id   <<<<<< the search is returning 0, it works if one uses "A" rather than say fromLett=A 
     BtoLett:=Search(toLett,Blist);# row id   <<<<<  ditto here
     A(BfromLett,BtoLett):=A(BfromLett,BtoLett)+ 1; # add statistic to the A-matrix
  end do; # end letter loop
end do; # end word loop
Error, index out of bounds
The search function is failing: 
Blist; Wletters; Bletters; nWords; fromLett; toLett; BfromLett; BtoLett; A; iW; iL;
                 [W, P, K, C, Y, F, X, H, T, E]
                               14
                               10
                               12
                              "W"
                              "P"
                               0
                               0

                 [0  0  0  0  0  0  0  0  0  0]
                 [                            ]
                 [0  0  0  0  0  0  0  0  0  0]
                 [                            ]
                 [0  0  0  0  0  0  0  0  0  0]
                 [                            ]
                 [0  0  0  0  0  0  0  0  0  0]
                 [                            ]
                 [0  0  0  0  0  0  0  0  0  0]
                 [                            ]
                 [0  0  0  0  0  0  0  0  0  0]
                 [                            ]
                 [0  0  0  0  0  0  0  0  0  0]
                 [                            ]
                 [0  0  0  0  0  0  0  0  0  0]
                 [                            ]
                 [0  0  0  0  0  0  0  0  0  0]
                 [                            ]
                 [0  0  0  0  0  0  0  0  0  0]
 

1 2 3 4 5 6 7 Page 3 of 7