tazatel

50 Reputation

4 Badges

3 years, 275 days

MaplePrimes Activity


These are replies submitted by tazatel

@tomleslie 

Why I was getting "complex values encounterred" error, that's a mystery. Now I tried the same script again and the parameters were evaluated without any problem.

Anyway thank you very much for your help. As always this forum led me to the simple solution.

I wanted to show that least square fitted parameters slightly differ between log and nelog form of function - that is interesting :)

@tomleslie 

1) The dependent variable are really percentages, my mistake.

2) The independent variable values should be x+273.15 (i.e. the thermodynamic temperature), my mistake again. That explains the parameters from Excel solver.

3) Statistics/Fit had a problem with a syntax:

1/100*<x1,x2,...,xn>

but anyway I got really similar results from both Statistics/Fit and DirectSearch/DataFit methods.

Now I want to try to fit my data set with a model in logarithmic form:

ln(k)-(E)/(8.314*873.15)*x

In this case the the data set values are:

x_hod:=<0.523423,0.401188,0.302917,0.205758,0.133740,0.064622,0.008082,-0.051079,-0.094384,-0.142415,-0.177166,-0.215604,-0.253814>:
y_hod:=<4.211780,5.605653,6.775331,8.175655,9.103345,9.726563,10.093024,10.345980,10.474990,10.585138,10.653900,10.752832,10.846981>:

and the k, E parameters should be very similar to the previous fit. However Statistics/Fit and DirectSearch/DataFit claim that "complex values encountered". How can be the fit of logarithmic model obtained?

cvičení-6-Ea-kr.mw

@Carl Love 

Thank you for this elegant solution.

I'm happy for the good fit because these values are really experimentally determined and the experimental method is not so sofistifed :) (the values are within a cloud point of ternary mixture polymer/solvent/nonsolvent).

@rlopez @tomleslie 

Thank you for both your answers, with grid option and also with PlotPositionVector I'm about to achieve my goal.

Of cource, with z=0 contour I meant z=0 plane. I misunderstood the translation.

With fieldplot3D[grid], the result looks good and there are many options to optimize the graph. The only glitch is that plotted vectors are not in the same z plane.

With plotpositionvector[vectorfield] all vectors are rendered in the same z plane. Unfortunately I haven't found any otpion to optimize the arrows. Everytime there are just those unsightly big red arrows. Also fieldplot3D[grid] seems better for me now.

@tomleslie 

No, fieldplot3d always wants continuous interval of z to be plotted. It cannot plot just one contour.

It seems vector field-contour option is missing in Maple. What a pity.

@Carl Love 

You didn't catch my idea.

I have no matrix or any other variable in Matrix. I'm trying to create it. I'm trying to create matrix variable from data in .txt file. Before I can use ImportMatrix command, I have to set proper format of the text in .txt file. That procedure (set proper format) I'm trying to do in Maple worksheet and that modified text I want simply to save (export) to .txt file.

THX everybody, it helped me a lot.

Now I'm trying to apply least-square function to independent value matrix:

X := ExcelTools:-Import("F:\\Bakalářská práce\\měření permeabilit jednotlivých plynů\\permeance.xlsx", "He", "A2:A6")

Y := ExcelTools:-Import("F:\\Bakalářská práce\\měření permeabilit jednotlivých plynů\\permeance.xlsx", "He", "B2:B6")

with(Statistics); f := NonlinearFit(d*x^3+c*x^2+b*x+a, X, Y, x, output = leastsquaresfunction)

F := map(f, X)

but the output indicates a problem with f(x):

img

How can I obtain leastsquaresfunction as a variable f := x -> ... ?

My worksheet: ws1.mw

Maple was treating a negative value under square root, thus giving complex number. I understand now.

Errando discitur

@Carl Love Decimal numbers indeed must be entered with decimal point. Thank you!

Also I reached DirectSearch command, but an error occured:

Error, (in DirectSearch:-SolveEquations) invalid input: too many and/or wrong type of arguments passed to DirectSearch:-GlobalSearch; first unused argument is i = 1 .. round((0.3125000000e-1*N-0.3225000000e-1)/((0.3125000000e-1*N-0.3225000000e-1)/((1/2)*N-1)+0.215e-1))

file3.mw

error screen

What's wrong?

@Markiyan Hirnyk Unfortunately, the error still remains :(

file2.mw

error screen

@Markiyan Hirnyk 

file1.mw , I'll do better next time.

@Markiyan Hirnyk 

Thank you for your help, I hope this approach is going to work fine.

However I'm totally noob in Maple.

I'm trying to create a variable with first equation, but an error occured:

Error, invalid input: `^` expects 2 arguments, but received 4

error screen

What's wrong?

The image URL is here:

http://i.imgur.com/11svoGY.png

Page 1 of 1