MaplePrimes Questions

I would like to create a fuction from the values in a vector. Say I have a 3 vectors , A,F,Theta.

A=col vect of Amplitudes (order n)
F=col vector of Frequecies (order n)
Theta=col vector of phases (order n)

I want to create a function 

f(x):=x->A[0]*cos(F[0]*x+Theta[0] + A[1]*cos(F[1]*x+Theta[1] + ... + A[n]*cos(F[n]*x+Theta[n]

I would then like to create a vector x, and get the values for f(x). I am trying to create a function that is a sum of sinusoids that I can then create data from using a vector x.

I have tried many things but I can't seem to get it right. Can anyone help me with this.

Thanks

Hello guys,

I created a palette, but when I click on an entry, the following occurs:

If the entry line, where the mouse cursor is, is empty, insertion takes place on this line.
If the input line has any expression and the mouse cursor is to the left of the expression, insertion takes place on the line above.

If the input line has any expression and the mouse cursor is to the right of the expression, insertion takes place on the line below.

Does anyone know how to fix this?

Sincerely,

Oliveira

Before answering, Please Note,

Do not suggest I use

maple <filename.maple>

The conversion in maple to convert an ".mw" file in xmaple for a text file to be executed with

maple command

does not work and I therefore need a way to execute and operate a ".mw" workksheet straight in terminal without the need for X.

This is a Linux based question.

I have batches of about 50 maple processes that I run in parallel accross several 32-core and 64-core servers.
I am not using the built in spawning process commands, but rather run a new instance of maple.

Some of these batches need to be developed in xmaple it is just not feasable to do it in a text editor to be executed by "maple"

QUESTION:

Is there any switches in maple that I can run a ".mw" maple file as a terminal operation without starting the interface ?

e.g. how can I run

xmaple <mystery switches> maplefile.mw   such that the interface doesnt load but the file is executed completely in terminal without the need for X.

Thanks

Hello, 

I am new to modelica modeling in Maplesim, how do I add ports to the custom component created by Modelica Custom Component in MapleSim?

thanks. 

How do I find the maximum value of k by putting dw/dk = 0? Also, how to find the range of k for which w is real? 

restart

w = -(1/2)*sqrt(960*c^6*gamma^2*k^2-336*c^4*gamma^2*k^4+64*c^2*gamma^2*k^6-4*gamma^2*k^8+576*alpha*c^6*gamma*k-288*alpha*c^4*gamma*k^3-16*alpha*c^2*gamma*k^5+8*alpha*gamma*k^7-144*alpha^2*c^4*k^2-48*alpha^2*c^2*k^4-4*alpha^2*k^6+128*c^4*gamma*k^2-40*c^2*gamma*k^4+4*gamma*k^6+48*alpha*c^4*k-16*alpha*c^2*k^3-4*alpha*k^5+4*c^2*k^2-k^4)

w = -(1/2)*(960*c^6*gamma^2*k^2-336*c^4*gamma^2*k^4+64*c^2*gamma^2*k^6-4*gamma^2*k^8+576*alpha*c^6*gamma*k-288*alpha*c^4*gamma*k^3-16*alpha*c^2*gamma*k^5+8*alpha*gamma*k^7-144*alpha^2*c^4*k^2-48*alpha^2*c^2*k^4-4*alpha^2*k^6+128*c^4*gamma*k^2-40*c^2*gamma*k^4+4*gamma*k^6+48*alpha*c^4*k-16*alpha*c^2*k^3-4*alpha*k^5+4*c^2*k^2-k^4)^(1/2)

(1)

diff(w = -(1/2)*(960*c^6*gamma^2*k^2-336*c^4*gamma^2*k^4+64*c^2*gamma^2*k^6-4*gamma^2*k^8+576*alpha*c^6*gamma*k-288*alpha*c^4*gamma*k^3-16*alpha*c^2*gamma*k^5+8*alpha*gamma*k^7-144*alpha^2*c^4*k^2-48*alpha^2*c^2*k^4-4*alpha^2*k^6+128*c^4*gamma*k^2-40*c^2*gamma*k^4+4*gamma*k^6+48*alpha*c^4*k-16*alpha*c^2*k^3-4*alpha*k^5+4*c^2*k^2-k^4)^(1/2), k)

0 = -(1/4)*(1920*c^6*gamma^2*k-1344*c^4*gamma^2*k^3+384*c^2*gamma^2*k^5-32*gamma^2*k^7+576*alpha*c^6*gamma-864*alpha*c^4*gamma*k^2-80*alpha*c^2*gamma*k^4+56*alpha*gamma*k^6-288*alpha^2*c^4*k-192*alpha^2*c^2*k^3-24*alpha^2*k^5+256*c^4*gamma*k-160*c^2*gamma*k^3+24*gamma*k^5+48*alpha*c^4-48*alpha*c^2*k^2-20*alpha*k^4+8*c^2*k-4*k^3)/(960*c^6*gamma^2*k^2-336*c^4*gamma^2*k^4+64*c^2*gamma^2*k^6-4*gamma^2*k^8+576*alpha*c^6*gamma*k-288*alpha*c^4*gamma*k^3-16*alpha*c^2*gamma*k^5+8*alpha*gamma*k^7-144*alpha^2*c^4*k^2-48*alpha^2*c^2*k^4-4*alpha^2*k^6+128*c^4*gamma*k^2-40*c^2*gamma*k^4+4*gamma*k^6+48*alpha*c^4*k-16*alpha*c^2*k^3-4*alpha*k^5+4*c^2*k^2-k^4)^(1/2)

(2)

NULL

NULL

Download drelation.mw

So I have a problem when copying multiple output from Maple to Word. I am using a simple example here. 

When I copy each part of the output as an image SEPERATELY, it comes out much cleaner than if I highlight everything together and then copy. Is there a reason this is the case and is there a way to fix this problem?

Here is the Maple Code:

with(plottools);
with(plots);
ttt1 := textplot([0, 1, "3  +  5  =  __", color = "black", font = ["Arial", "bold", 120]]);
display(ttt1, size = [1000, 200], axes = none);
ttt1 := textplot([0, 1, "1  +  3  =  __", color = "black", font = ["Arial", "bold", 120]]);
display(ttt1, size = [1000, 200], axes = none);

I also uploaded the Maple Worksheet

Here is the output:

There are TWO imges in the output in this example. I tried copying both together and pasting them, and then I tried copying them individually. The output is very different in quality.

The one copied alot is much cleaner once copied and pasted in Word. Does anyone why this is happening? I don't want to have to copy images individally for obvoius reasons. I know this example is only two images but what if there was alot more, etc.

Thank you

NULL

with(plottools); with(plots); ttt1 := textplot([0, 1, "3  +  5  =  __", color = "black", font = ["Arial", "bold", 120]]); display(ttt1, size = [1000, 200], axes = none); ttt1 := textplot([0, 1, "1  +  3  =  __", color = "black", font = ["Arial", "bold", 120]]); display(ttt1, size = [1000, 200], axes = none)

 

 

NULL

Download Copy_Images.mw

y''(x)+2(y'(x))^2+8y(x)=0   

y(0)=0 , y'(0)=1

Hello there, 

Is there any chance to ask if there is a way to simplify the numeric outcome from an operation?

Here is what I've been trying:

restart;

with(LinearAlgebra):

interface(imaginaryunit=j):

Amat := Matrix(2, 2, [[-0.1428571428*K__D, -0.1081971238], [376.9911185, 0]]);

Matrix(2, 2, {(1, 1) = -.1428571428*`#msub(mi("K"),mi("D",fontstyle = "normal"))`, (1, 2) = -.1081971238, (2, 1) = 376.9911185, (2, 2) = 0})

(1)

Eigenvalues(Amat);

Vector(2, {(1) = -0.7142857140e-1*`#msub(mi("K"),mi("D",fontstyle = "normal"))`+0.2000000000e-9*sqrt(0.1275510203e18*`#msub(mi("K"),mi("D",fontstyle = "normal"))`^2-0.1019733868e22), (2) = -0.7142857140e-1*`#msub(mi("K"),mi("D",fontstyle = "normal"))`-0.2000000000e-9*sqrt(0.1275510203e18*`#msub(mi("K"),mi("D",fontstyle = "normal"))`^2-0.1019733868e22)})

(2)

Desired := sqrt((2.000000000*10^(-10))^2 * (1.275510203*10^17*K__D^2 - 1.019733868*10^21));

(0.5102040812e-2*K__D^2-40.78935472)^(1/2)

(3)

 


I tried to simplify the Eigen values, to make them in the formality of the 'Desired' numerical expression, but no success yet. 

Thank you, 

Download Q20230110_m1.mw

Consider this matrix

a b c

b c a

c a b

I would like to reference the entries with letters, not numbers.  The b,c entry would be a, for instance.  Any way to do this?

If I draw a new molecule in chemdraw and save can we input it in someway and get the 3D coordinates , 2D , and many other details which we can get from the structure.

As I am new and I am planning to buy this toolbox please kind help

Hello,

    I am manually re-creating the TS diagram for phase plot of fluid=air for use in a report as a pretty plot.   The TemperatureEntropyChart function is colored in grayscale.  I really need to change to colorized for additional data being added.

   The code to generate the various isobars color gradient is shadebetween two curves.   

    Using the code method to plot leaves white gaps in the discontinutiy of the plot curves returned from the Property function at the liquid and vapor lines.   I have manually connected the horizontal "under the dome" in a matrix of X,Y for each of two isobar curves.

   However, the shadebetween doesn't seem to like the two X,Y matrices for the curves as inputs to shadebetween.

    So,...   Q:   1.)  Can the color be changed using the TempertureEntropyChart function,..or
                      2.)  Can matrices of unequal X,Y values (scatterplot type data sets) be used for the curves in shadebetween command?  The help infers the Y (v, of (u,v))  values need to match.

Thanks,
Bill

Ref:    worksheet contained at:  https://www.mapleprimes.com/maplesoftblog/203462-Computing-With-Thermophysical-Data

Give a Data for regression in excel sheet with many independent variables as much as 50 and one dependent variable. where first row is dependent variable say

Is their anyway in maplesoft to split into Train and test set 

Then it choose only best set of independent variables to model the dependent variable Y Linear regression

Is their any Toolbox or anyway we can do it

Can anyone help to write a code for this in Maple

Kind help.

Please help with a sample example program Kind help

restart

with(DEtools); with(LinearAlgebra)

diff(u(x, t), t) = [Matrix([[0, (1/2)*mu*k^2], [2*A^2-(1/2)*mu*k^2, 0]])]*u(x, t)

diff(u(x, t), t) = [Matrix(%id = 36893489823894642308)]*u(x, t)

(1)

"where u(x,t)=[u1 u2]^(T) is a vector. The solution of differential equation (1) is u=v*exp(w*t)."

where*w^2 = -(1/4)*mu^2*k^4+mu*k^2*A^2

"How can we solve differntial equation*(1) on Maple"?""

NULL

Download dsol.mw

Hello guys
Could someone help me create a simple palette to contain, for example, three functions that I use constantly?

           conve1(a), conve2(a) and conve3(a).

I tried through the help documentation, but I couldn't.

Sincerely,
Oliveira

First 224 225 226 227 228 229 230 Last Page 226 of 2410