MaplePrimes Questions

I know that this is a stupid question but I cannot find how to do the dyadic product of two matrix. Those matrix could be two tensor matrix and I need to do this multiplication:

Thank you in advance for your help.

Mario

Hello,

    I am regularly using tabled data for things like material properties, or other tabled look-up data from induustry or custom datasets.

    I have not used workbooks within Maple and yet see that exel files or other data sets can be "connected(?)" in the workbook tree.  Is this helpful?

    What is the best practice view of connecting to DB data and looking up variables that repeat project to project or worksheet to worksheet - without pulling into memory the full datasets for each ref call?

All thoughts appreciated.   

P.S., Tables vs. dataframes are a slight confusing matter also.  The access to the cell info seems different based on dataframe/table/matrix type.  I have no problems with matrix element access.

Thanks,
Bill

"object at address is binary"

                                                          

The following code is attempting to pass 'debug' through 2 procedures

p1 := proc(a, b, {debug::truefalse := false}) print("p1", debug); a + b; end proc;
p2 := proc(a, b, {debug::truefalse := false}) print("p2", debug); p1(a, b, 'debug' = true); end proc;
p2(1, 2, 'debug' = true);

The result I get is 
 

                           "p2", true

                          "p1", false

                               3

How can I get the value of debug in my call statement to p2 to be passed to p1?

Thanks

Hi 

I wanna export data from maple to excel and I tried this:

ExcelTools:-Export(op([1, 1], plots:-display( convert( ans1[12..14,3], list))));

I was expecting 4 columns including z vector and 3 columns from ans1[12..14,3] but got only 2 columns.Case1_Revised_080922.mw

Please any help?

when i try to save my program maple is close, crashing. how can i fix this?

Hello dear

please guide me how to solve linearly system in explicit form.

In this purpose of this problem is to find  w1, w2 w3  as symblic solution in Matrix form. and I hope that in the futher the vairiables consist of w1 ... wn and will still be applied in those simplied form or explicit form.

Thank you

_____________code________________________________________________________________

Vector[column](3, [0.85*((phi__cs*beta__s*f__con) . (D__pile*w__1)) + Vector[column](1, [-5/6*H - 5/8*P]), 0.85*((phi__cs*beta__s*f__con) . (D__pile*w__2)) + Vector[column](1, [5/6*H - 5/8*P]), 0.85*((phi__cs*beta__s*f__con) . (D__pile*w__3)) + Vector[column](1, [1/2*H - 3/8*P])])

In solving the brachistochrone for a fine string of length L under the pull of g passing through the point (0,0) and (a,b) using the euler-lagange method,I stumble on this non-linear relation:

C*sinh(mu*g*a/C)=L

which I need to solve for C.

Maple give me the famous RootOf:

RootOf(A*exp(_Z)^2 - 2*_Z*L*exp(_Z) - A)

where A = mu*g*a

Can it be solve for C or am I force to use numeric method?

Thank you in advance for your help.

Mario

hello Dear

I am new here I am not clear about Loop in Maple, I am stuck here.

Please correct and guide me 

thank you

input

 

Loop

Expect result

-------------------------------------------Code--------------------------------

KTe := Matrix(3, 1, [[Matrix(4, 4, [[216, -288, -216, 288], [-288, 384, 288, -384], [-216, 288, 216, -288], [288, -384, -288, 384]])], [Matrix(4, 4, [[216, 288, -216, -288], [288, 384, -288, -384], [-216, -288, 216, 288], [-288, -384, 288, 384]])], [Matrix(4, 4, [[500, 0, -500, 0], [0, 0, 0, 0], [-500, 0, 500, 0], [0, 0, 0, 0]])]]);
DOFe := Matrix(3, 4, [[1, 2, 3, 4], [3, 4, 5, 6], [5, 6, 1, 2]]);
with(ListTools);


with(LinearAlgebra);
nn1 := Row(DOFe, 1);
                      nn1 := [1, 2, 3, 4]

KG1 := Matrix(6, 6);


KG := Matrix(3, 1);

for k from 1 to 3  for i from 1 to 4 do      for j from 1 to 4 do    nn:=Row(DOFe,k):   KG1[nn1[i],nn1[j]]:=(KTe[k[],1])[i,j]    end do  end do   KG[k,1]:=KG1[k] end do;
 

Is there a way to print points that have additional information that can be probed when mousing over the points?

I have an array of arrays with information in each element including the point: [x,y1,y2,R1, R2, R3, R4]

Where y1 and y2 are different values to graph per x(different plots)  and Rk are records for the data(other info that goes along with them such as day of week, rainfall on that day, etc). The different graphs might have different scales so it would be nice if they handled scaling effectively(e.g., |y1| < 1 and y2 > 3430).

I have about 50k points so it has to be relatively fast... as it's already taking a few minutes to process the data in to the array from a file using fopen and readline(not sure why so slow as I'm just using a few parses and cats to put it in an array but probably is being slowed by not being able to pre-allocate the array.

Hello every one, i am New using maple and I am trying to translate This code from matemática to maple, someone can help me please? 

I need to count how many times a special function shows up in an expression.

The problem is that indets returns a set. So if the same function shows up more than one time in the original expression, with same arguments, only one of these will show up in the result. So I would not know if there were mmore than one of these.

Here is a simple example, using sin(x) here.

restart;
expr:=sin(x)+3*cos(x)*sin(x)+1/sin(2*x);
indets(expr,'specfunc(anything,sin)')

#gives
#   {sin(x), sin(2*x)}

So when I do nops() on the above, it gives 2 and not 3.

How to obtain number of times a function shows in an expression, even it if is repeated?

Hello everybody, im at it again. Math with maple. I should be picking up some speed again to plow through this Dutch math book that explains Maple. It creeps me out.. But hey, im learning Maple in the process, and that is what its all about!

The example shows what is done. I made question a. happen, and the answer was right. The thing is with question b. they ask to plot the phase vectors alpha of f(t), g(t), and s(t), although there is no variable t in the phase vector. So how on earth will i plot it in the complex plane?

The literal translation of quesion b is: "check graphically the answer of part a. by drawing the phase vectors f(t), g(t), and s(t) in the complex plane."

I cant get it done. 

Would anyone know the right question. There were no graphs displayed at the answers in the back of the book. 

Thank you!

Greetings,

The Function

Opdracht 2

a.

"f(t):=3*cos(2*t-Pi/(4))"

proc (t) options operator, arrow, function_assign; 3*cos(2*t-(1/4)*Pi) end proc

(1)

"g(t):=4*cos(2*t+Pi/(6))"

proc (t) options operator, arrow, function_assign; 4*cos(2*t+(1/6)*Pi) end proc

(2)

f(t)+g(t)

3*sin(2*t+(1/4)*Pi)+4*cos(2*t+(1/6)*Pi)

(3)

smartplot(3*sin(2*t+(1/4)*Pi)+4*cos(2*t+(1/6)*Pi))

 

3*sin(2*t+(1/4)*Pi)+4*cos(2*t+(1/6)*Pi)

3*sin(2*t+(1/4)*Pi)+4*cos(2*t+(1/6)*Pi)

(4)

3*exp(I*(0-(1/4)*Pi))

(3/2)*2^(1/2)-((3/2)*I)*2^(1/2)

(5)

4*exp(I*((1/6)*Pi))

2*3^(1/2)+2*I

(6)

NULL

3*sqrt(2)*(1/2)-(1/2)*(3*I)*sqrt(2)+2*sqrt(3)+2*I

(3/2)*2^(1/2)-((3/2)*I)*2^(1/2)+2*3^(1/2)+2*I

(7)

evalf(%)

5.585421959-.121320343*I

(8)

arctan((2-3*sqrt(2)*(1/2))/(3*sqrt(2)*(1/2)+2*sqrt(3)))

arctan((-(3/2)*2^(1/2)+2)/((3/2)*2^(1/2)+2*3^(1/2)))

(9)

evalf(%)

-0.2171747628e-1

(10)

5.585421959*cos(2*t-0.2171747628e-1)

5.585421959*cos(2*t-0.2171747628e-1)

(11)

smartplot(5.585421959*cos(2*t-0.2171747628e-1))

 

b.

"fc(t):=3*(e)^(I*(0-Pi/(4)))"

proc (t) options operator, arrow, function_assign; 3*exp(-((1/4)*I)*Pi) end proc

(12)

"gc(t):=4*(e)^((I*Pi)/(6))"

4*exp(((1/6)*I)*Pi)

(13)

"sc(t):=(3 sqrt(2))/2-(3 &ImaginaryI; sqrt(2))/2+2 sqrt(3)+2 &ImaginaryI;"

proc (t) options operator, arrow, function_assign; (3/2)*sqrt(2)-((3/2)*I)*sqrt(2)+2*sqrt(3)+2*I end proc

(14)

``

Download Mapleprimes_Question_Book_2_Paragraph_3.9_Question_2_b.mw

I wonder if there is any way to use ArrayInterpolation with contourplot or similar effect?

N_data.xlsx 

Thank you in advance,

restart;

with(CurveFitting)

[ArrayInterpolation, BSpline, BSplineCurve, Interactive, LeastSquares, Lowess, PolynomialInterpolation, RationalInterpolation, Spline, ThieleInterpolation]

(1)

with(plots);

[animate, animate3d, animatecurve, arrow, changecoords, complexplot, complexplot3d, conformal, conformal3d, contourplot, contourplot3d, coordplot, coordplot3d, densityplot, display, dualaxisplot, fieldplot, fieldplot3d, gradplot, gradplot3d, implicitplot, implicitplot3d, inequal, interactive, interactiveparams, intersectplot, listcontplot, listcontplot3d, listdensityplot, listplot, listplot3d, loglogplot, logplot, matrixplot, multiple, odeplot, pareto, plotcompare, pointplot, pointplot3d, polarplot, polygonplot, polygonplot3d, polyhedra_supported, polyhedraplot, rootlocus, semilogplot, setcolors, setoptions, setoptions3d, shadebetween, spacecurve, sparsematrixplot, surfdata, textplot, textplot3d, tubeplot]

(2)

alpha := <seq(0..10,evalf(10/50))>:
beta := <seq(0..10,evalf(10/50))>:

excelfile:= FileTools:-JoinPath(["C:","Users","aimer","OneDrive","Desktop","Msc Thesis","Maple ref","N_data.xlsx"]);

"C:\Users\aimer\OneDrive\Desktop\Msc Thesis\Maple ref\N_data.xlsx"

(3)

NN:=ImportMatrix(excelfile,source=Excel):

_rtable[36893489576445216036]

(4)

#?ImportMatrix;

#NN:=ImportMatrix(matlabData, source=MATLAB);

#currentdir();

"C:\Users\aimer\OneDrive\Desktop\Msc Thesis\Maple ref"

(5)

 

contourplot(ArrayInterpolation([beta,alpha],NN,[x,y]),x=0..10,y=0..10,contours=[0]);

Error, (in CurveFitting:-ArrayInterpolation) invalid input: xvalues are not specified correctly

 

#?listcontplot

 

Download test1.mw

I do not know what is the problem with Using ImportMatrix. N_data.xlsx is in the same directory.

Any comment would be appreciated.

restart;

with(CurveFitting)

[ArrayInterpolation, BSpline, BSplineCurve, Interactive, LeastSquares, Lowess, PolynomialInterpolation, RationalInterpolation, Spline, ThieleInterpolation]

(1)

with(plots);

[animate, animate3d, animatecurve, arrow, changecoords, complexplot, complexplot3d, conformal, conformal3d, contourplot, contourplot3d, coordplot, coordplot3d, densityplot, display, dualaxisplot, fieldplot, fieldplot3d, gradplot, gradplot3d, implicitplot, implicitplot3d, inequal, interactive, interactiveparams, intersectplot, listcontplot, listcontplot3d, listdensityplot, listplot, listplot3d, loglogplot, logplot, matrixplot, multiple, odeplot, pareto, plotcompare, pointplot, pointplot3d, polarplot, polygonplot, polygonplot3d, polyhedra_supported, polyhedraplot, rootlocus, semilogplot, setcolors, setoptions, setoptions3d, shadebetween, spacecurve, sparsematrixplot, surfdata, textplot, textplot3d, tubeplot]

(2)

alpha := <seq(0..10,evalf(10/50))>:
beta := <seq(0..10,evalf(10/50))>:

excelfile:= FileTools:-JoinPath(["C: ","Users","aimer","OneDrive","Desktop","Msc Thesis","Maple ref","N_data.xlsx"]);

"C: \Users\aimer\OneDrive\Desktop\Msc Thesis\Maple ref\N_data.xlsx"

(3)

NN:=ImportMatrix(excelfile,source=Excel);

Error, (in ImportMatrix) file or directory does not exist: C: \Users\aimer\OneDrive\Desktop\Msc Thesis\Maple ref\N_data.xlsx

 

?ImportMatrix;

#NN:=ImportMatrix(matlabData, source=MATLAB);

currentdir();

"C:\Users\aimer\OneDrive\Desktop\Msc Thesis\Maple ref"

(4)

?Joinpath

 

Download test1.mw

First 279 280 281 282 283 284 285 Last Page 281 of 2428