MaplePrimes Questions

I am trying to calculate the volume, lateral surface, ..., of a cone when we have two of three: radius of base, height, generator of cone.
My code only find with a element of list. How can I print all the results of the list? My code

                                                                    

restart;
 L := [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17], [9, 40, 41], [11, 60, 61], [12, 35, 37], [13, 84, 85], [15, 112, 113], [16, 63, 65], [17, 144, 145], [19, 180, 181], [20, 21, 29], [20, 99, 101], [21, 220, 221], [23, 264, 265], [24, 143, 145], [28, 45, 53], [28, 195, 197], [32, 255, 257], [33, 56, 65], [36, 77, 85], [39, 80, 89], [44, 117, 125], [48, 55, 73], [51, 140, 149], [52, 165, 173], [57, 176, 185], [60, 91, 109], [60, 221, 229], [65, 72, 97], [68, 285, 293], [69, 260, 269], [84, 187, 205], [85, 132, 157], [88, 105, 137], [95, 168, 193], [96, 247, 265], [104, 153, 185], [105, 208, 233], [115, 252, 277], [119, 120, 169], [120, 209, 241], [133, 156, 205], [140, 171, 221], [160, 231, 281], [161, 240, 289]];
R := op(1, L[1]);
h := op(2, L[1]);
 l := op(3, L[1]);
peremeter_base := 2*Pi*R;
S_base := Pi*R^2;
V := (1/3)*Pi*R^2*h;
S_lateral := Pi*R*l;
S_total:= Pi*R*l + Pi*R^2;

 

I have spent much of my time earlier to make curve fitting possible. Somehow, because of my mistakes, the format for curve fitting changed. Can any one help me with getting my answer for curve fitting in the doc and from the excel data enclosed. Data imported, but donot know how to order the way it wants. I know the way,but do not iknow how to get it now.

Thanks

Ramakrishnan VExperimentalData.xlsxPleasePlot_Doubt.mw
 

restart; with(ExcelTools)

D6EFF := [20, 25, 23, 29]

[20, 25, 23, 29]

(1)

D6EFFP := evalf[3](CurveFitting:-LeastSquares(BP, D4EFF, v, curve = a*v^2+b*v+c))

58.8-19.8*v+2.75*v^2

(2)

 

M1 := Import("C:/Users/dell/Desktop/ExperimentalData.xlsx", 2)

Matrix(%id = 18446745680754394150)

(3)

M1[1, 11]

"D6P10U"

(4)

M1[1, 10]

"D6P5U"

(5)

M1[2, 15]

.267

(6)

NULL

for i to 21 do N[i] := NULL; for j to 7 do N[i] := N[i], M1[j, i] end do; d[i] := NULL; for j to 7 do d[i] := d[i], [N[1][j], N[i][j]] end do end do; y := a*x^2+b*x+c; for i from 2 to 21 do d[i] := [d[i]]; c[i] := CurveFitting[LeastSquares](d[i], x, curve = y) end do

Error, (in CurveFitting:-LeastSquares) data points not in recognizable format

 

d[1]

["BrakePower", "BrakePower"], [2.356, 2.356], [2.749, 2.749], [3.142, 3.142], [3.534, 3.534], [3.927, 3.927], [4.32, 4.32]

(7)

d[2]

[["BrakePower", "S2"], [2.356, .303], [2.749, .271], [3.142, .256], [3.534, .249], [3.927, .244], [4.32, .241]]

(8)

d[3]

["BrakePower", "S4"], [2.356, .256], [2.749, .225], [3.142, .211], [3.534, .205], [3.927, .2], [4.32, .197]

(9)

NULL

``


 

Download PleasePlot_Doubt.mw

 

Dearz!

Hope everyone is fine with everything. I am facing problem to solve the system of PDEs in the attached file. Is there any built-in command to the solve the attached system of PDEs via FEM, FDM, SIMPLER algorithm or some other efficient method? Please try to fix my problem. I am waiting your positive response. Thanks in advance.

PDEs_sol.mw


Dear colleagues, Can anyone explain what (a::list,b::list) will be understood by the programme?

I thought the programme is made for only adding the numbers in the list. But it seems there is something more than that, i could not get.

Equn label (6) onwards, I donot understand, how the answer was obtained.

Thanks for explaining.

Ramakrishnan V

with(MathematicalFunctions:-Evalf); -1; addList1 := proc (a::list, b::integer)::integer; local x, i, s; description "add a list of numbers and multiply by a constant"; x := b; s := 0; for i in a do s := s+a[i] end do; s := s*x end proc

proc (a::list, b::integer)::integer; local x, i, s; description "add a list of numbers and multiply by a constant"; x := b; s := 0; for i in a do s := s+a[i] end do; s := s*x end proc

(1)

s := addList1([1, 2, 3, 4], 2)

20

(2)

s := addList1([2, 2, 3, 4], 2)

22

(3)

x := 2 = 2NULL

s := addList1([x, 2, 3, 4], 2)

22

(4)

s := addList1([2, x, 3, 4], 2)

22

(5)

sumList := addList1([4, 3, 1, 3, 4, 3], 2)

26

(6)

s := addList1([4, 3, 1, 3, x, 3, 4, 3], 2)

34

(7)

s := addList1([2, 2, 3, 4], 2)

22

(8)

s := addList1([4, 3, 1, 8, x, 3, 4, 3], 2)

58

(9)

x

2

(10)

``


 

Download Doubt_on_list.mw

I have successfully created a a function of Y for the Beta-Binomial probability masss function using the built in distributions for the beta probability density function and the binomial probability mass function. However, despite trying many different things, I cannot take that function and turn it into a probability distribution for a random variable.  Of the code given below, all lines work except the last.  If someone could please help me, I would be most appreciative.

fYgivP := proc (Y) options operator, arrow; ProbabilityFunction(Binomial(n, P), Y) end proc

fP := proc (P) options operator, arrow; ProbabilityDensityFunction(('Beta')(a, b), P) end proc

fYandP := proc (Y, P) options operator, arrow; fYgivP(Y)*fP(P) end proc

fY := proc (Y) options operator, arrow; int(fYandP(Y, P), P = 0 .. 1) end proc

BB:=Distribution(ProbabilityFunction= X->piecewise(X<0,0,X>=0,  unapply(fX(X),X)))

I executed finding the roots of the derivative of a series expansion containing 500 terms.  I did it 2 ways.  The 1st using fsolve & the 2nd using RootFinding.  The fsolve took over 20 minutes to find a single root within a specified range while the RootFinding took less than 60 seconds to find all roots within a larger range.  I do not know of the inner mechanisms of either command, but why is this the case?  Why would the algorithms differ?  My results are in the link below.

fsolve_vs_RootFinding.mw

I am trying to use fracdiff with a variable order argument, e.g. plot3d( fracdiff(x^2, x, t), x=0..1, t=0..2);

I get the error message "Error, (in fracdiff) Unable to determine ceiling of t"

but I am unable to find any information on this error.

 

i want to plot these four functions in the same graphe f(x)=1/1+x^2 on the intervalle [0,1] also the second function the line curve that connects the two points(0,f(0)) and (1/3,f(1/3)), the third function the line curve that connects the two points (1/3,f(1/3)) and (2/3,f(2/3)), the fourth function the line curve that connects the two points (2/3,f(2/3)) and (1,f(1))

can anyone help me ?

Hello there !

I'm currently working on a project and I have a simple problem that I can't solve.

I've solved an equation system and I get an answer which looks like G := {A=exp1,B=exp2}  (exp stands for expression)

I would like to assign exp1 and exp2 to my variables : A:=exp1 & B:=exp2

How can I manage to get that ? 

Thank everyone :)

plot([(exp((1/2)*x))((1/2)*x+2*t*(1/3)), (exp((1/2)*x))(1+t((-256)+240-108+27)/2^7+t(168-24+27)^2/2^7+(1/3)*t^3*((-16)+9)/2^6+(1/4)*t^4/2^7), (exp((1/2)*x))(1+t(256*(-1.01)+240*(-1.01)^2+108*(-1.01)^3+27*(-1.01)^4)/2^7+t(168*(-1.01)^2+24*(-1.01)^3+27*(-1.01)^4)^2/2^7+(1/3)*t^3*(16*(-1.01)^3+9*1.01^4)/2^6+(1/4)*t^4*(-1.01)^4/2^7)], x = -4 .. 4, t = 5)

Hello!

I im interesting  how to stop executing algorithm if user chose "cancel" in maplet filedialog?

restart;
maplet:=Maplet(FileDialog['FD1']('filefilter' = "*.txt,*.m",
'filterdescription' = "TXT-files and Maple m-files",
'directory'= "D:\\NIR\\Experimental result\\Data\\",
'onapprove' = Shutdown(['FD1']), 'oncancel' = Shutdown())):
Maplets[Display](maplet):
f1:=%[1];
#Point to stop executing
a := 1;
b := 2;

 

I have this expression:

-sin(alpha)*(sin(theta1)*cos(theta)-cos(theta1)*sin(theta))

which can be combined using a trigonmetric formula...

However when using combine() it also tried to sneak alpha into the result...

Is it possible to freeze the variable alpha when combining?

Can anyone tell me why maple wont accept my constraint?

Code:

LPSolve(3*x__1+14*x__2+18*x__3+6*x__4+2*x__5, {3*x__1+5*x__2+6*x__3+2*x__4+x__5 <= 10}, x__1 = 0 .. 1, x__2 = 0 .. 1, x__3 = 0 .. 1, x__4 = 0 .. 1, x__5 = 0 .. 1, maximize = true)

It returns the error "Warning, problem appears to be unbounded", when i can clearly see that it is bounded!

Im trying to solve the LP-relaxation of a binary problem which is why i have a 0..1 bound on every variable. Running Maple 2016.1 on windows if thats a help.

Please help me

First 895 896 897 898 899 900 901 Last Page 897 of 2433