## Items tagged with data

Hello everyone!

Could somebody help me with reading data from Huge txt-file? My file contains matrix with 10 columns and 10^6 rows. Datatype is float[8].

I use "ImportMatrix" comand to obtain data from file, but it is rather slow ~ 33 sec.

is there an efficient way to read file directly using Maple? Or I should use C-dll to read file faster?

## Diluting series of values...

Hello everyone !

I have several values loaded into Maple as a matrix from a .txt file (output of my measurement).

I measured power in dependence on time.

Here is an example of my txt file in which the first column represents the time and the second column represents the force:

29.04 997.54
29.06 998.83
29.08 999.79
29.10 1000.76
29.12 1001.72
29.14 1003.01
29.16 1003.81
29.18 1004.94

From 3624 values I need to get specific amount of values, lets say 3000, while keeping the course. We could call it a dilution I guess.

Here is a simple illustration of the problem:

So I am asking you to help me find out some function to dilute measured values while keeping the curve.

I will be grateful for any advice.

## unable to store.....when datatype=float[8] Main...

Hi, so I am a newbie with simulation on maplesim. I've made a simulation of the lower part of a humanoid robot and I attempt to input angles to the joints from an excel file.

However, after adding my file .xls to the data set and linking it to a time lookup table, I get this error:

 unable to store Time when datatype=float[8] Main

Havent installed any add-ins, I am working with excel 2007, Maplesim 6.4 and Maple 18.

Any insight on the problem would be of great help.

Thank you

## Curve fitting for function and experimental data...

Hi

friend i want fit a curve regarding some data and fnction and how we can find the values of a,b,c and d for the following

f=1-(8*a*b+6*c*d/(b*k*x))/(2*a*b+c*b*(1/(b*k*x)))

X := Vector([200, 210, 220, 230, 240, 250, 260, 270, 280, 290])

Y := Vector([.4172, .3030, .4668, .3317, .1276, .1303, .1733, .1451, .3466, .4125])

## Workbook issues...

Dear Maple users

I have done some experiments with the new Workbook feature in Maple 2016. It is a very welcome addition, indeed. Earlier I have created Maple files in which data from an external Excel file was imported and being used for certain calculations. In order to make recalculations work properly, one need to let the Excel file follow the Maple file. That's where a Workbook come in handy! I tried placing those two files in a Workbook. It didn't work completely as advertised, I think. I moved the Workbook to another location on the harddrive to make sure it wouldn't interfere with the original files outside the Workbook. Then I recalculated the Maple document inside the Workbook. The good thing: The data from the Excel file was still present. The bad thing: If I changed some data in the Excel file inside the Workbook, it didn't register in the Maple file when updating it!

Maybe I should explain that I did import data from the Excel file into Maple via the menu: Tools > Assistants > Import Data... The data was retrieved as a matrix within the Maple file and assigned to a variable and used for plots ...

Why doesn't the above procedure work properly? I hope one don't need to use the Workbook URI to reference files within the workbook. It is not that userfriendly!

Regards,

Erik

## How Can I plot the data result of a program?...

hello!, How can i to plot the next data in a 2D plot?. it is the result of a loop for.... do....while. I had tried with pointplot anda dataplot, but must be something wrong!

with(plots);
for i from 1.73205080756887853 by 0.5e-2 while i < 2.87500000000000000 do roll := i; f1max := NLPSolve(f1, {f2 = i}, x1 = 0 .. 2, x2 = 0 .. 3, method = sqp, maximize = false); c := op([1], f1max), print(c, roll) end do; plot(roll, c);
Warning, limiting number of major iterations has been reached
2.86923108976435204, 1.73205080756887853
2.40562374977021154, 1.737050808
2.36135298525774395, 1.742050808
2.34703023482192563, 1.747050808
2.33762023747274306, 1.752050808
2.33074752039182975, 1.757050808
2.32549269761476607, 1.762050808
2.32138461334482216, 1.767050808
2.31814359109128576, 1.772050808
2.31558754335936889, 1.777050808
2.31359008686494683, 1.782050808
2.31205927196994354, 1.787050808
2.31092573645557353, 1.792050808
2.31013563350152307, 1.797050808
2.30964617400063910, 1.802050808
2.30942269107110354, 1.807050808
2.30943663600124838, 1.812050808
2.30966416809946962, 1.817050808

## How to extract two or three columns from an XLSM f...

I attempt to get two (or better, three) datas from an XLSM file. The tools doesn't work. I want then to do some tests about the apparied datas extracted.

Could you help me ? The best I did was getting a matrix result from an XLS (and not XLSM) file, and I don't know what to do with this kind of result, as I want only test some hypothesis as a linear regression with or without least squares, not do learn what to do with this matrix result..

Thx to you,

Milos

## How to reduce noise using a Fourier Transform on a...

Hello,

I've got a load of data that contains a lot of noise in the form of sinusoidal interference patterns. This is quite thick and it disturbes what I am trying to look at. I've uploaded a picture to represent what I am trying to show. I know I need a cut-off frequency I just don't know how to implement it. Thank you in advance for your help!

Gambia Man

## Aggregate Statistics on DataFrames

by: Maple 2016

Aggregate statistics are calculated by splitting the rows of a DataFrame by each factor in a given column into subsets and computing summary statistics for each of these subsets.

The following is a short example of how the Aggregate command is used to compute aggregate statistics for a DataFrame with housing data:

To begin, we construct a DataFrame with housing data: The first column has number of bedrooms, the second has the area in square feet, the third has price.

`bedrooms := <3, 4, 2, 4, 3, 2, 2, 3, 4, 4, 2, 4, 4, 3, 3>:area := <1130, 1123, 1049, 1527, 907, 580, 878, 1075,          1040, 1295, 1100, 995, 908, 853, 856>:price := <114700, 125200, 81600, 127400, 88500, 59500, 96500, 113300,           104400, 136600, 80100, 128000, 115700, 94700, 89400>:HouseSalesData := DataFrame([bedrooms, area, price], columns = [Bedrooms, Area, Price]);`

Note that the Bedrooms column has three distinct levels: 2, 3, and 4.

`convert(HouseSalesData[Bedrooms], set);`

The following returns the mean of all other columns for each distinct level in the column, Bedrooms:

`Aggregate(HouseSalesData, Bedrooms);`

Adding the columns option controls which columns are returned.

`Aggregate(HouseSalesData, Bedrooms, columns = [Price])`

Additionally, the tally option returns a tally for each of the levels.

`Aggregate(HouseSalesData, Bedrooms, tally)`

The function option allows for the specification of any command that can be applied to a DataSeries. For example, the Statistics:-Median command computes the median for each of the levels of Bedrooms.

`Aggregate(HouseSalesData, Bedrooms, function = Statistics:-Median);`

By default, Aggregate uses the SplitByColumn command to creates a separate sub-DataFrame for every discrete level in the column given by bycolumn.

`with(Statistics);`
`ByRooms := SplitByColumn(HouseSalesData, Bedrooms);`

We can create box plots of the price for subgroups of sales defined by number of bedrooms.

`BoxPlot( map( (m)->m[Price], ByRooms),              deciles=false,              datasetlabels=["2 bdrms", "3 bdrms", "4 bdrms"],              color=["Red", "Purple", "Blue"]);`

I have recorded a short video that walks through this example here: https://youtu.be/e0pqCMyO3ks

## How to read a JSON file?...

Dear all,

I am looking at the help page for reading json files, but it is too advanced for me to understand...

Can anyone give an easy example where a json file is read into a variable and printing the data structure?

Hugs,
Louise =)

## Data in Worksheet...

How much MB of data one can compile in single worksheet without fear of crashing?

I asked this question because I have maple worksheet with almost 1000 of lines, initially sheet use to open very quickly but as soon as data started piling up the opening of worksheet slowdown significantly.

Should I worry about such slowdown due to large amount of data in worksheet or should I need to create another worksheet to divide data??

Regards

## Fitting of surface from matrix data...

Hey guys,

I want to fit experimental data and I was wondering if there is a special PolynomialFit function for a surface.

My data consist of a X,Y, Matrix of densities and I want to have a function describing the surface of the values. On matlab the following code will do so:

[x, y, z] = prepareSurfaceData(temps, concs, densities);
ft = fittype('poly33');
fitresult = fit([x, y], z, ft);

Maybe that gives you a better view of what I want.

Best regards

## Datatable understanding...

Hi,

I'm not sure that I mean datatable component corectly.

I also consider that I was done somthing wrong

Thank you for advanced for any help.

 >
 >

Oryginaly DataTable was inserted as a 3 x 3. I will traing to push maple to obtain 4 x 4 with specific row and column name.

 >
 >
 >
 >
 >
 >
 >
 >
 >
 >

wzel

## Find all coordinates of the graph...

I have plotted an equation which is in terms of 'a & omega'

Now i need coordinates of every points as an n*2 matrix

 (1)

## Numeric Integration over Discrete Data...

Dear All

I have an numerical integral to solve over set of 10 discrete values. The problem is, this integral have two dependent variables. Please see following:

Numerical_Integration.mw

How to Solve following integral numerically over discrete data values?

 >
 (1)

where we have data values are given as under

x=1, 2, 3, 4, 5, 6, 7, 8, 9, 10

= 0.045, 0.0459, 0.0564, 0.05689, 0.06015, 0.06235, 0.0654, 0.0687, 0.07012, 0.07251

= 1.15, 1.256, 1.56, 1.85, 1.86, 2.01, 2.35, 2.56, 2.86, 2.901