## Importing data from Excel into Maple ...

Hello,

Thanks to different posts of the subject "Exporting data from Excel to Maple", I could learn the method to do it and conduct it.

Now, I would like to store the data exported from Excel to Maple in the worksheet and make my worksheet independent from the excel sheet.

The idea is that I can send my worksheet to a collegue and he can use without the excel sheet.

May you advice me a strategy to store the imported data ?

The copy/ paste works but it doesn't look smart.

## Error when fitting function to data...

Dear Maple users

Physical experiment: I dropped a ball with low mass from a height of approximately 7 meters and wanted to test if the air resistance was proportional to the square of the velocity. I filmed the fall and used the program Logger Pro to collect data: a number of datapoints (time,height) was collected. I copy/pasted the datapoints into MS Excel, from where I could import data into Maple via Tools > Assistants > Import Data ... Then I wanted to make a fit with the theoretical solution, given by a function having just one parameter: the Drag coefficient. Unfortunately I received an error "complex values encountered" (see below). I can solve the problem manual by making a number of guesses for the drag coefficient, until the theoretical curve approximates the data points well. I wanted to make Maple do the fitting job, though. I will appreciate if someone could give an idea how to fit the data properly.

NB! Mass m and g is defined above in the Maple document. The Statistics and plots package is called too.

## Creating matrix of fsolve output...

Hi Please I need help with making the output of my fslolve appear in a way that I can easily copy to an excel.

I am doing analysis for 3 countries and each time I produce a result I copy manually to excel and use 'text to column' and the 'transpose' excel options to arrange the results in order. I do this for almost 20 time because I want to see how hows in parameter affect the variables. is there a way I can convert this to a 32 by 3 matrix so that I can copy all at the same time instead of copying each variable at a time. here is my solve command

UK_SOL_FIRST:= fsolve(eval({eq||(1..32)}, Params_UK_FIRST), InitValue_UK_FIRST);
ES_SOL_FIRST:= fsolve(eval({eq||(1..32)}, Params_ES_FIRST), InitValue_ES_FIRST);
DK_SOL_FIRST:= fsolve(eval({eq||(1..32)}, Params_DK_FIRST), InitValue_DK_FIRST);

The Results

UK_SOL_FIRST:={A_ss = 14.36104896, C_ss = 1.445842138, I_ss = 0.3136706500,

K_ss = 12.54682600, K_v_ss = 125.4682600,

LT_ss = 0.01061009037, L_ss = 4.014721807, N_ss = 0.9307582996,

P_a_ss = 0.9336893751, P_ss = 0.8625403648,

Surp = 0.9890479879, U_b_ss = 0.1781599919,

U_ss = 0.1046105158, V_ss = 0.05052687912, W_max = 1.476989982,

W_min = 0.4879419937, W_ss = 1.826907218,

W_tilde = 3.478049987, Y_ss = 2.428417935, aa_ss = 21.67403493,

chhi = 0.4523413798, f_c_ss = 0.04880034560,

m_ss = 0.03536881539, p_d_ss = 0.9907986980,

x_T = 0.7023268636, y_d_ss = 10.57030302, y_f_ss = 1.174478111,

y_x_ss = 10.57030300, z_ss = 21.14060602,

Profit_ss = 4.094720376, phi_prod = 0.9753885739,

theta_ss = 0.4830000000}

ES_SOL_FIRST:={A_ss = 10.91702785, C_ss = 2.038687975, I_ss = 0.3058575000,

K_ss = 12.23430000, LT_ss = 0.1309315222, L_ss = 2.857497927,

N_ss = 0.8398656215, P_a_ss = 0.9680877046,

P_ss = 0.8638978804, Surp = 2.541617932, U_b_ss = 0.9095925505,

U_ss = 0.1819708847, V_ss = 0.03119500880, W_max = 3.252738093,

W_min = 0.7111201606, W_ss = 3.605202340,

W_tilde = 3.665280790, Y_ss = 2.367929032, aa_ss = 15.67939783,

betta = 0.9909865708, chhi = 0.2898275349,

f_c_ss = 0.6743530978, m_ss = 0.02183650616,

p_d_ss = 0.9939322922, x_T = 0.005556307841,

y_d_ss = 7.853422751, y_f_ss = 1.195945300,

y_x_ss = 7.978400682, z_ss = 15.83182343,

Profit_ss = 3.084421270, phi_prod = 1.009721394,

theta_ss = 0.1714285714}

DK_SOL_FIRST:={A_ss = 16.18893837, C_ss = 1.359886068, I_ss = 0.2487000000,

K_ss = 9.948000000, LT_ss = 0.02282780783, L_ss = 5.834365727,

N_ss = 0.9399351536, P_a_ss = 0.7054445707,

P_ss = 0.8796237740, Surp = 0.6511024854,

U_b_ss = 0.4572819488, U_ss = 0.08450316042,

V_ss = 0.03491187713, W_max = 1.293898615,

W_min = 0.6427961298, W_ss = 2.363825013,

W_tilde = 2.758200925, Y_ss = 1.755529412, aa_ss = 34.56310241,

betta = 0.9851712031, chhi = 0.4499333284,

f_c_ss = 0.1898151486, m_ss = 0.02443831399,

p_d_ss = 1.032636460, x_T = 0.1506134910, y_d_ss = 11.17773688,

y_f_ss = 0.9144278497, y_x_ss = 13.74561008,

z_ss = 24.92334696, Profit_ss = 4.926248216,

phi_prod = 0.7210969276, theta_ss = 0.4131428571}

## Fit of coefficients ...

I have some excel data which I need to fit in the formula:

0.5a*erfc(0.5*2^0.5*(-x+m1/s1)) + (0.5-0.5a)*erfc(0.5*2^0.5*(-x+m2/s2))

In this formula the coefficient m ans s are mean and standard deviation and a is the weigth of 2 peak in a cummulative gaussian distribution.

I fitted this (I will insert the maple file) and found:

-48736.43 erfc(-0.707x + 0.707) + 48736.43 erfc(0.707x + 0.707)

Can this be correct?

And how do I find the values of m1, s1, m2, s2 and a?

## Problem with printing out values ...

To begin with my code is:

with(Statistics);

N:=RandomVariable(Normal(5,2))

for i from 1 by 1 to 100 do

OS[i]:=Sample(N,50)

end do

for i from 1 by 1 to 100 do

print(i)

from j from 1 by 1 to 1000 do

BS[i,j]:=Bootstrap('Mean',OS[i],replications=1)

end do

end do

My goal is to produce as an output in the software's screen the values of 1000 bootstrap means for each of 100 original samples in order to export the results to Excel. Based on my basic knowledge of programming I thought that I can do that through the use of the vectors. Unfortunately though when I trigger the operation the software seems to be evaluating (with the homonymous indication in the bottom left corner of the screen) it for an indefinite period of time, obliging me to stop it at some point. However, let me point out that when I do the same process for i and j 4 and 10 for example then I have results, therefore presumably my code is correct. I know that I can do the same operation in Excel and I have already created a respective macro, however I wanted to use Maple in order to take advantage of its fast operation of calculations, which is pointless in case that I have to wait more time for the results than I have already waited to be eventually produced.

Any thought and idea would be appreciated, thank you very much in advance!

## Fit based on Excel data...

Hello

I am working on a project where I need to find the parameters of the formula:

1/2*a*erfc(1/2*2^(1/2)*(-x+m1)/s1)+(1/2-1/2*a)*erfc(1/2*2^(1/2)*(-x+m2)/s2)

which is the formula for the cumulative distribution for two gaussian peaks, one with average m1 and standard deviation s1, the other m2 and s2, with weights a and (1-a). I have data in excel that form the gaussian distribution but now I need to find the parameters of the formula that fits these data.

Is there a command in maple to find these parameters or how do I start? And do I need to upload the data from excel to maple or do I need to insert only some values?

Some one who could help me, because it is really hard and I find no information for this.

Hasselhof

## opening an xlsx file ...

I've got an excel file and a maple file saved in the same folder and am trying to import the contents of the excel file using  the Exceltools[Import]("name of file.extension") command as given in the manual but it doesn't seem to work. I've also tried copying the entire path of the file in the argument but that doesn't seem to work either. What am I doing incorrectly?

## How to exclude data points when plotting a point p...

Hey

I have a excel spreadsheet with a number of data points which I want to plot in Maple.  I have imported the data and I did manage to produce a point plot, but how can I exclude some of the data points when I plot the point plot?
I would, for example, like to exclude the negative values and only plot the data which is greater than zero.

Thanks

## error with data file attachment and loockup table...

Hi,

I have a problem with a 1D loockup table with a Data set file. It seems that there are some problems with the file but I don't understand which.

I tried to use a .xlsx file and the result is this error (note that the table in excel has 17 rows, so at the 18 there is nothing):

Then I tried with a .csv file and I had this error:

I put below the MapleSim file, is not completed: just to have a look at the errors and the attached file, so don't consider other things.

srpingdamper.msim

the .xlsx attached files is the following, while i'm not able to upload the .csv but it's the same one just saved as .csv:

damperTR.xlsx

Thanks a lot.

## Exporting data from Maple to an excel sheet...

Hello,

I'm looking to export the results of calculated variables to cells in a excel sheet.

For that purpose, I have used this code

with(ExcelTools);
Fichier:="Z:\2_Boulot\tabledeparametrage.xls";
Feuille:="Feuil1";
Export(xA1_Fus, Fichier, Feuille, "B3");

The error message is the following :

ExcelTools:-Export called with arguments: Array(1..1, 1..1, {(1, 1) = .3182057489}), Z:2_Boulot tabledeparametrage.xls, Feuil1, B3
#(ExcelTools:-Export,6): streamcall(INTERFACE_EXCEL_EXPORT(R,_params[2 .. -1]))
Error, (in ExcelTools:-Export) file I/O error La syntaxe du nom de fichier, de répertoire ou de volume est incorrecte
locals defined as: d = d, R1 = R1

Do you have idea why I didn't manage to export a result to a cell in excel ?

I think that it is probably because I don't define well the adress of my file. How do you define a the adress of a file which is contained in a folder on a harddrive in Maple?

Thanks a lot for your help.

## Import data from excel to maple and plot......

Hi:

i have data in a file excell(attach in below) and i will import them to maple and plot the figure,how do this work?

with regards...

data.xls

## How to export just the numbers from spreadsheet to...

When I try to export my data from a spreadsheet to Excel, instead of numbers I get a long text containing numbers. For example instead of having just "11625.7677908435" I get "Typesetting:-mprintslash([11625.7677908435], [HFloat(11625.767790843516)])".

## plot graph excel data...

Book1.xlsHelow ,

I want to plot a gaph the data is store in excel sheet. thanks in advance

## plotting a 2D figure by Excel data...

hi all

I want to plot a 2D fig by maple. my data are in an excel file and they are too much to import them one by one manually. When I copy and paste them in maple, they appear in a column...

thank a lot for your help.

## Find Trendline and R-squard value from data...

Hi

I have some data:

Matrix(10, 2, {(1, 1) = 0, (1, 2) = 0, (2, 1) = .5, (2, 2) = 3.25, (3, 1) = 1.0, (3, 2) = 5.82, (4, 1) = 1.5, (4, 2) = 7.50, (5, 1) = 2.0, (5, 2) = 8.79, (6, 1) = 2.5, (6, 2) = 9.83, (7, 1) = 3.0, (7, 2) = 10.66, (8, 1) = 3.5, (8, 2) = 11.35, (9, 1) = 4.0, (9, 2) = 11.94, (10, 1) = 4.5, (10, 2) = 12.46})

I want Maple to make a trendline fitting a Logarithmic function. I can make it output some function with this:

LeastSquares(`<,>`(.5, 1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0, 4.5), `<,>`(3.25, 5.82, 7.50, 8.79, 9.83, 10.66, 11.35, 11.94, 12.46), x, curve = a+b*ln(x))

It outputs:

5.96497783539274+4.25309474196387*ln(x)

But please notice, the dataset in the function does not have the first 0 and 0. If i do that:

LeastSquares(`<,>`(0, .5, 1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0, 4.5), `<,>`(0, 3.25, 5.82, 7.50, 8.79, 9.83, 10.66, 11.35, 11.94, 12.46), x, curve = a+b*ln(x))

It outputs:

Error, (in Matrix) numeric exception: division by zero

Besides that, i need the R-squard value for determinating how well it fits.

If i do the same thing i Excel the data set will give a formular: 5.5464ln(x)-0.2175 with a R-sward value of 0.9985.

How can i do this i maple?