Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

HPM_4.mwhi, I am using homotopy perturbation technique but there is arising an error in comaring coeffecient of p^0, p^1,.... plz help me

 

I am looking for a thread that had the animation of a house with transverse earthquake waves.

Can someone point me to that thread?

Hello

I want to solve this equation in Maple, but I can't - please help me.

 

60=18+69*e(-0,0491t)

 

Thanks.

I want to plot two functions on the same 3D plot. X axis is Pa, Y axis is Pb, and Z axis is the value of each functions. (Profit1 an Profit 3)

I want to see dots (preferably different color) for each function's values based on different Pa and Pb combinations. So, it will be easy to navigate how these functions approach (or drift apart) based on Pa and Pb. 

I attached the maple file. My functions are Profit1 and Profit3.

Pa and Pb are probability values ranging 0 to 1, with 0.01 increment. I have the condition that Pa<Pb, always.

So, Pb = 0:0.01:1

      Pa = 0:0.01:(Pb - 0.01)  (This the for loop I use in MATLAB, I am not sure it is the same in Maple)

The constant values are:

c = 0;
p = 1;
wu = 0.8;
w = 0.5;
Ha = 100;
Hb = 200;

How should I plot these functions on 3D? I also wonder that if it is possible to plot this scenario on 2D. scenario1.mw

Can i make a system of equations like this in maple?

 

What i am trying to do is i want to get all system of equations. For example when n=2, then we should get 8 equations like D(1,1,1), D(1,1,2),D(1,2,1),D(1,2,2),D(2,1,1),D(2,1,2),D(2,2,1) and D(2,2,2). If n=3 then the number of equations is 27 and so on. Can someone please advice me on this?

thanks

witribm

Maple’s Code Generation makes it possible to translate your Maple code to various other programming languages including C, Python, and several others. In Maple 2015, we added a new Code Generation target to one of my other personal favourite languages, R. R is a programming language designed for statistical computing and graphics, so no code translation from Maple to R would be complete without attempting to translate as many commands as possible from Maple’s Statistics package. 

Translating code from one language to another is tricky business. Maple 2015 represented the first time that any Code Generation target language added the ability to translate commands from the Statistics package. With R, we found that many common statistics commands had almost a one-to-one mapping, such as Statistics:-Mean = mean, but several others were much more complicated, including several commands for dealing with probability functions that did not have direct mappings due to differences in how the systems handle symbolic probability functions.

A list of statistics commands that can be translated from Maple to R can be found here.

In addition to assisting me recall the correct syntax in R, having worked with CodeGeneration[R] for several months now, I find that one of my most common uses for Maple’s code generation to R is simply to pass data between the systems. A simple example:

 CodeGeneration:-R( LinearAlgebra:-RandomMatrix( 5, 2 ) );

translates to the following in R:

 cg <- matrix(c(-4,27,8,69,99,29,44,92,-31,67),nrow=5,ncol=2)

To see a couple more short examples, here’s a short video that I recorded on Code Generation to R:

A little known fact about Code Generation is that the translation files can be viewed in from the “samples” directory in your Maple install directory. Similar to many of Maple’s packages, you can view all of the source code that Code Generation uses for its translations. For example, you can view the translations for the commands that I mentioned above from the “FunctionTable.mm” file inside of your “%MapleInstallDir%/ samples/CodeGeneration/R” directory.

Should you have any feedback on this translation, or any other, please feel free to contact us. We’re also on the hunt for our next code generation targets, so let us know what other languages you would like to see added as Code Generation targets.

Hi Mapleprimes,

I have a conic section that is parametric.  Namely,

x(t) = 9t^2 + 3t  + 367
y(t) = 3t^2 + 2t + 122

How can I find the Vertex and Foci of this curve?
Also, How can I do this for the general case?

Regards,

Matt

Dear Friends,

I am having trouble in defining a linear differential operator. This is how Maple defines a linear differential operator

"A differential operator L in C(x)[Dx] is an expression a_0*Dx^0+ ... +a_n*Dx^n where a_0, ... , a_n are elements of C(x). So it is a polynomial in Dx with rational functions as coefficients."

Here's the link http://www.maplesoft.com/support/help/maple/view.aspx?path=diffop

where Dx^n implies n-th derivative with respect to x.

Now I want to know how can I apply this operator to a given function. Here is a failed example:

>L :=Dx^2+Dx;
Dx^2 + Dx
>simplify(L(x));
Dx(x)^2 + Dx(x)

I was expecting to get 1 if the given opertor is applied to x. I would really appreciate if someone can help me with this. 

Many thanks.

 

Hi, i got a litlle problem with fromats, i m realy bad at this.
i got procedure 'getone(z::list)' i was execute it like this  
>getone([seq(lineP[i], i = 1 .. pm)]::list)
where lineP is 

>pm := 3;
>rollx := rand(98.0 .. 102.0); rolly := rand(-1.0 .. 5);
>rolll := rand(.5 .. 1.0); rollf := rand(0. .. evalf(2*Pi));
>rollm := rand(0. .. 20.0);

>for i to pm do lineP[i] := [rollx(), rolly(), rolll(), rollf(), rollm()] end do;

it's pm times of z:=[rollx(), rolly(), rolll(), rollf(), rollm()] ::list

and i need make optimization work for any pm=1..100; with rabdomly generated iteration point as above.

The main queston is how make minimize as below
Minimize(z,variables=[z],   initialpoint={z=[seq(lineP[i], i = 1 .. pm)]},iterationlimit=1000,optimalitytolerance=0.01)

work with z::list kind of 

[[100.7798614, 1.109653266, 0.9840371500, 4.257816686, 9.737110573][100.0135459, 0.887539481, 0.9144164697, 3.980093624, 7.343851161][100.0661308, 3.724268229, 0.5020544909, 2.052134822, 14.37408543]]








I have some large worksheets in maple which I would like to export to Latex. Currently, the exported document included both the commands and the results. For example, if the maple code looks like:



The latex document will be:

    %% Created by Maple 17.01, Windows 7
    %% Source Worksheet: test4Export.mw
    %% Generated: Fri Sep 11 11:25:29 CEST 2015
    \documentclass{article}
    \usepackage{maplestd2e}
    \def\emptyline{\vspace{12pt}}
    \begin{document}
    \pagestyle{empty}
    \DefineParaStyle{Maple Heading 1}
    \DefineParaStyle{Maple Text Output}
    \DefineParaStyle{Maple Dash Item}
    \DefineParaStyle{Maple Bullet Item}
    \DefineParaStyle{Maple Normal}
    \DefineParaStyle{Maple Heading 4}
    \DefineParaStyle{Maple Heading 3}
    \DefineParaStyle{Maple Heading 2}
    \DefineParaStyle{Maple Warning}
    \DefineParaStyle{Maple Title}
    \DefineParaStyle{Maple Error}
    \DefineCharStyle{Maple Hyperlink}
    \DefineCharStyle{Maple 2D Math}
    \DefineCharStyle{Maple Maple Input}
    \DefineCharStyle{Maple 2D Output}
    \DefineCharStyle{Maple 2D Input}
    \begin{Maple Normal}{
    \begin{Maple Normal}{
    A test equation}\end{Maple Normal}
    
    }\end{Maple Normal}
    
    \begin{Maple Normal}{
    \begin{Maple Normal}{
    }\end{Maple Normal}
    }\end{Maple Normal}
    \mapleinline{inert}{2d}{A = c+d}{\[\displaystyle A=c+d\]}
    \begin{maplegroup}
    \mapleresult
    \begin{maplelatex}
    \mapleinline{inert}{2d}{A = c+d}{\[\displaystyle A=c+d\]}
    \end{maplelatex}
    \end{maplegroup}
    \begin{Maple Normal}{
    \begin{Maple Normal}{
    \mapleinline{inert}{2d}{}{\[\displaystyle \]}
    }\end{Maple Normal}
    }\end{Maple Normal}
    \end{document}

and the output is:


Is there a way to solve this once while exporting in Maple instead of editing the latex code manually?

I imported data into maple from excel.  I was able to make a scatterplot with my data and a regression line, but I have been unsuccessful in trying to combine them both onto the same plot.  I tried multiple different ways but still could not get it to work.  

I think it has to do something with the brackets around each element inside my imported array, but I am not sure.  Any ideas would be nice.

My objective is to put the regression line and scatterplot on same graph.project1.mwproject1.mw  

Thanks much.

Matt 

I have a series of formulae arranged as a vector.  I need to do two things to this vector:

(1) Optimize it using 'tryhard'.  

(2) Use the optimized results to create a new procedure.

 

I can do either (1) or (2) alone, but when I try to combine them as one command it never works.  A simplified example of what I'm attempting with the resulting error message is below:

with(codegen, optimize, makeproc);
V := Vector(4);
V[1] := x+y;
V[2] := x^2+y^2;
V[3] := x^3+y^3;
V[4] := x^2+y^2+x+y;

T := makeproc([optimize(V, 'tryhard')], [x, y]);

Error, (in codegen/makeproc) Unrecognized input [t78 = x+y, t73 = y^2, t74 = x^2, t77 = t73+t74, t1 = (Vector(4, {(1) = t78, (2) = t77, (3) = t73*y+t74*x, (4) = t77+t78}))]


It seems that makeproc cannot handle a combination of optimized assignments and a vector of formulae.  Is there anyway to fix this?

 

Thanks

Hello guys, I have a question. Is there any possibility to calculate two or more procedures at same time in the maple18 ?. I m thinking about using of the Grid or threads tools.

My problem is:

Given two functions/ procedures, f1(x,y) and f2(x,y). I need make an parallel computation of f1 and f2 and after i need get

f3 = f1+f2.

I am very grateful for the help.

I have the following equation

phi = -arctan(sin(2*theta)*(cos(beta)-1)/(cos(beta)*cos(2*theta)-cos(2*theta)-cos(beta)-1))+theta;

phi = -arctan(sin(2*theta)*(cos(beta)-1)/(cos(beta)*cos(2*theta)-cos(2*theta)-cos(beta)-1))+theta

 

In the denominator I wish to collect the two cos(2*theta) terms  into a single term, as in

(1-cos(beta))*cos(2*theta)

 

Is there a straighforward way of doing it?

 

 

 

 

 

As you can see, could you know how many columns of matrix ee has?

It is not easy.

The true column number is 7.

Is there a good method to sperate differetn columns apart? for example, use comma

First 1207 1208 1209 1210 1211 1212 1213 Last Page 1209 of 2224