Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

SMath - New Found Feature

Status
Not open for further replies.
Replies continue below

Recommended for you

This is from the description of the function:

importData("1:fileName", "2:delimiter", "3:delimiter", "4:delimiter", "5:number", "6:number", "7:number", "8:number", "9:number") - Returns a matrix of loaded data from specified file "1:fileName". Function can be used with 1-9 of the arguments specified. Digit 0 (zero) can be used for the arguments (except "1:fileName") to get the built-in default values. Function is able to read data with manually specified Decimal Symbol ("2:delimiter"), Arguments Separator ("3:delimiter") and columns delimiters ("4:delimiter"). To read a specific region of the data file rows an columns ranges can be requested ("5:number" - start row, "6:number" - end row, "7:number" - start column, "8:number" - end column). To read a data represented symbolically "9:number" can be set to 1.

TTFN (ta ta for now)
I can do absolutely anything. I'm an expert! faq731-376 forum1529 Entire Forum list
 
IRS: illustrated in the example. I have a lot of data in excel spreadsheet format... that I can now input into SMath... have to use a little judgement... the AISC and CISC shape database would be one huge matrix... <G> My scanner OCR creates a really good CSV file. As Mark Twain said (I think), "I haven't had so much fun since the orphanage burned down." You can easily select a specific bit of data...

Dik
 
IIRC, when this was done in Mathcad, the array would load values from the data file every time the sheet was refreshed, making it possible to update the values in MathCAD "on the fly" as the other file changed.
Does SMath work this way?

It would be fun to do a real-time or "near" real-time vibration analysis with SMath Studio. I don't think it has Fourier transforms, yet...


No one believes the theory except the one who developed it. Everyone believes the experiment except the one who ran it.
STF
 
SparWeb
I'll try inputting the ASCE steel section excel data... an array of 30 or so values for 200 sections, and see how that runs, both for loading and recycling. Stuff I've done is small and time for loading negligible.

When I used to program, I'd have ASCII data files that I used the extension *.adf. I'd search for *.bdf files and if not existing, would load the *.adf file. Import these as variables (usually Type) and immediately store them as binary files aka *.bdf. When running a program and loading data, it was so much faster to load and save the data as binary. This was back before Windows, when machines were much slower... Kept it up with Delphi after windows.

I was able to load the first 116 lines so, a matrix 116x30... had to modify it to remove characters and the program doesn't seem to like nul cells. There is an error in line 117 that I couldn't find.

The data is loaded as soon as I change the filename and hit <Enter> and doesn't seem to slow anything down.

Dik
 
 https://files.engineering.com/getfile.aspx?folder=519efea8-f158-418f-8f7c-da92bb4a1bfd&file=DataInput.pdf
By copying line 116 through to line 375, the program loads the 375x30 array without a glitch. A couple of caveats. I don't know if you can have a column of string variables. SMath accommodates this within the program so it might from a *.csv file. Will find out. And it does not appear to accommodate a 'nul' cell. I'll have to dig in to that and will keep you posted.

Dik
 
If you use a 'nul', the function simply removes it and does not leave a cell where the nul was.

The function will not accept an alphanumeric value. Input string error...

It's been fun... next step is to remove the 'W' and 'x' values and to recreate a string variable where the Wzz x zzz column was. Should also be able to modify cells to incorporate units by multiplying the cell value by the unit.

Dik
 
dik:
I found doing some cleanup to the AISC shape database file was worthwhile. I went thru and swapped all the '--' or empty cells to 0 and changed the text from unicode to ansi so there are no more special characters. All pretty easy to do within excel or a text editor but it makes sorting and grouping a bit easier having the 0 in properties that don't exist. I also pulled out the units and definitions as separate csv's and mapped them to the shape indexes.

Open Source Structural Applications:
 
Celt83... I suspected it was some sort of embedded character that was causing the glitch... thanks,

Dik
 
yeah if I remember right in the 15th edition excel file a large portion of the double hyphens are actually the unicode equivalent which gave me all kinds of issues when I was working with it in python and the associated gui I use. A quick save to csv then find/replace fixed it right up.

Open Source Structural Applications:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor