75 Reputation

5 Badges

9 years, 127 days

MaplePrimes Activity

These are replies submitted by wswain

This is a great worksheet and very illuminating of the mode responses.  The animations showing the complex motions is quite amazing.



Thank You,


@Joe Riel 


Your original email said to contact you to know where best to get these for Windows.  The Git seems to be Unix based mostly (?).


Just a little navigation through your sources and steps to install please.





@Joe Riel 

Hi Joe and thanks for replying.

I have shied away from emacs or vi(m) as unix based.  My Ubuntu is ver 14.04 and is so old to upgrade its a nightmare on dual boot.   I am about to overhaul the dual boot and remove the Ubuntu in total just to fix windows 10 issues.  It never operated well and spent many hours with the "

sudo apt-get update

process to get past the ancient and new secruity checks that fight each other.


My day job is to use code to do useful things, not chase OS upgrades that obsolete functions or add features never needed, or to close a security holes that broke it in the first place..

PS., Windows does SSDD   ...Sighing much. 


Any assist here would be greatly appreciated and thanks again in advance!





The first time I used this worksheet I used a length command for the vector length and it worked fine. 

Looking back I should have used ArrayTools:-NumElems for the single column vector.  


Anyway here is another try at uploading.Triax_18_inch_arm_X-axis_plane_trimmed_(logic_checked).xlsx




There was an "insert link" button next to the file uploaded.  I can't see it in my message view as posted.  So, here is the native xls file too (if it posts)



Thank you for looking at this.  Here is the csv file and I added three columns with the function test "isnumber" to check your idea.  The filter doesn't see any other output except true from what I've seen.

The import matrix line is:

Accel1:=ImportMatrix(cat(path1,"/",Dir_Vect[1], output = matrices)   #returns 141713 x 5 Matrix

Accel2:=(Accel1, 3)   #To select column 3 for processing  

Accel3:=(Accel2, 3000..len1_int)   #trims the channel's idle wait data off the beginning until 1 second before real data is live until the integer length of a selected segment





my my main thought was that we have quite a few users on Matlab and if there is a benefit to “port” across the commands for readability, etc.


I am not interested in making Maple into MAtlab lite.


Appreciate your responses



This is my first use of maple eigenvalue functions of the linearAlgebra package.


I was looking at the outputs of the eigenvalue function and got my values expected, although not neatly sorted lowest to highest as the matlab eig(Matrix) returns.   The sort function worked great on the eigenvalue vector to order them.

I assumed the eigenvector returned the matrix of vectors, but not the values as they are two unique commands.


When you say MTM is part of the regular package do you mean loaded using with(MTM) call.   As to getting an external toolbox?


I still ask is there any benefit to the MTM functions over Maple?   Or, Maple direct is better as not trying to replicate Matlab?   


I have no druthers with Maple over Matlab.  I do have issues that a lot of reference books use MATLAB and the function mapping to Maple is sometimes a challenge to replicate results if not using the commands in the same way.


Thanks in Advance and for your first reply. 


@Carl Love 

@Joe Riel 



fixed the errors and works like champ.  I love it when things works as advertised.

[x(t)] was the correct list syntax AND returntype is Datapoint - NOT- Datapoints


I do wish the error checker was a little better correcting and explaining syntax errors.



@Joe Riel 


thank you.  I abbreviated the imports for brevity, but the rest of the comments are great.  Will try shortly.

@tomleslie    I do try to dig through help before coming here.


I can see I have not worked much with the Maple matrix operators and this is just more familiariztion with the op command and the other nuiances.   

The approaches have been very helpful to put me back on track.






@dharr   would most Maple users that understand all the maple uniqueness considered heavy users on a daily basis?   As an engineer I am not a professional coder, but need to use the tool (any tool, Matlab, MathCAD, fortran of old, etc.) to solve problems.   Maybe this is all easy(?) for professional code writers.  How unique are these language constructs to other programming languages?


I use Maple for my Professional License continuing education needs as I believe the tool is the more robust but it has its code operations features that seem a bit difficult.  JMHO.


Thank you and will continue to press forward with this and the info above.  Appreciate any continued dialog.




@tomleslie    Thank You very much!

Looks like pretty much the goal.  I like your method of changing the '-', "&ndash"

This is my lack of maple experience and limited usage of -> arrow operator and the ~ tilde operator in next line.   I'll check in the morning in slow time.  any hints would be helpful.

Next the output matrix is great, my goal will be to reduce the 166 columns as a lot of that data is not necessarry.  But for ease at this moment I like the approach and if small memory footprint, just carry the excess data along.   

Just reading through how you extracted and if you could comment around the seq function on what it is doing within "Matrix".   I don't see the from 1 to end (or last row) as the seq idx.  Is the 1st argument the matrix  SD[1st row, all columns] being set to start scan as start row?

I see/note the scan=columns (read across columbs in a row?) at the end.   


the NULL line is confusing 

lastly forgive my newness with the op command.  In this case op[1,1] is referencing which expression that its grabbing the [1st operand of expression 1(?)] .  Is it the 1st row as expression 1?


Back on memory.  Did you check the import time and can the var SD be checked for memory utilization?  Presuming this grabs a copy of the full table.  I am not sure how some 10,000 record data sets will import though like this on performance.  I did look at the matlab xlsread as the goal I was trying with Maple (the hard ay) to scan in place the data without loading into mem as a var.







@tomleslie    The mw file is not really cleaned up for publishing.  Here is the main parts copied out.


Initial excel flat file form AISC,



Mydatafile := "aisc-shapes-database-v15.xlsx"

Steel_data := Import(Mydatafile, "Database v15.0")


len_Steel_data := Size(Steel_data)[1]

S_mod__min := 11.66666667

j := 1 (index for sub data collection matrix)

> for i to len_Steel_data do

    if S_mod__min < Steel_data[i, 41] and Steel_data[i, 7] <= 10.5 then

            location1_row[j] := i;

            location1_row[j, 2] := Steel_data[i, 7]; j := j + 1;

     end if;





[1082, 2], [1086, 2], [1087], [1086], [1085], [1084], [1083], [1082], [1085, 2], [1083, 2], [1087, 2], [1084, 2]


[10.1], [9.73], [255], [254], [253], [252], [251], [250], [9.92], [10.0], [10.5], [10.1]





for i in entries(location1_row, 'pairs') do
end do;

                        (1082, 2) = 10.1
                location1_row[(1082, 2) = 10.1]
                        (1086, 2) = 9.73
                location1_row[(1086, 2) = 9.73]
                           1087 = 255
                   location1_row[1087 = 255]
                           1086 = 254
                   location1_row[1086 = 254]
                           1085 = 253
                   location1_row[1085 = 253]
                           1084 = 252
                   location1_row[1084 = 252]
                           1083 = 251
                   location1_row[1083 = 251]
                           1082 = 250
                   location1_row[1082 = 250]
                        (1085, 2) = 9.92
                location1_row[(1085, 2) = 9.92]
                        (1083, 2) = 10.0
                location1_row[(1083, 2) = 10.0]
                        (1087, 2) = 10.5
                location1_row[(1087, 2) = 10.5]
                        (1084, 2) = 10.1
                location1_row[(1084, 2) = 10.1]

end do


CLUMSEY OUTPUT TO INDEX NEXT ACTIONS ON  (IMHO as List, with ramdom indices refs)

To use as a data vector to perform extra work on subset.


Establishing the size prior to first query and su set generation vs using "MyData[i] := assign value to matrix or array variable location" doesn't work well.   The pre DIM of array constructor seems a Fortran or C model vs dynamic managament of Size(M).

Have not used dataframe or select but have used Matlab with this type indexing.   P.S., not a fan of Matlab for many other reasons.  Really just wanter better understanding and ease with using and manipulating data in matrices from either equation generation data, or data from a reference source.

FYI, this short vid shows an indexing loop in Matlab to generate matrix elements.  Note ease of establisment :-)


Thanks again in advance.











As far as SQL, I do have systems that use SQL and these are real relational databases in Oracle or other.   The Server side vs the client side for the data query is non-trivial, but for complex relational info - I get it.


For simple flat table look-up like steel grade properties that I'm using to identify a sub-set of options are maintained, issued by AMS, IEEE, etc. in xls, xlsx formats often.   Export to csv is fine, but then loose connection to original file created by the data source.


I have been trying the import yesterday and it takes a bit (10-15 secs) to import the excel file into a matrix.  I am not sure how much memory is used by this matrix now.   My MemoryinUse() returns -> 27597656,  or kernelopts(bytesalloc)/1024 -> 124364, in kbytes which I presume is reading 124Mb?

On my status bar memory went from 44M to 77M.   So not sure which one is right and how much the data the Matrix var is consumeing.  On the one hand with a 8GB laptop this should be trivial.   I don't undertand the reason it takes 10-15 seconds to process the command and import the matrix data.  


The search was quite fast and now just working out how to create a sub-set array/matrix.   Since the "for i from 1 to last row do" an "If statement search" to look for the data of interest was returning a resonable response time but the response was a list with a arbitrary indices (i.e. 1086 for first element in list) for the elements returned.  Reallocation/fill of a proper Array/Matrix data structure with zeros of Size(x) is always a challenge when quering data sets within the program. 


As such, I won't know the size until I process the query.  Dynamic allocation, creation of array size based on results from the search seems a challenge in Maple.  Is it me or how I'm approaching dynamic allocation/creation of matrices/arrays.


The list result that did get established from the data record found was hard effort sorting the indices/pairs to then have a second step to process to a true vector, array or matrix for further processing.

Again, appreciate your reply.  Just trying to add to see if the way to manage data sources - which original thought is to open as a link and search using the file in its native source without import or copy to retain original state of information.  Yes read only always for data source info.   P.S, I did look at the database tools and recognise the big volcano database info example, and other GIS info references.


Again, Thanks in advance for any assitance here.






1 2 3 Page 1 of 3