Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

I wish to compare five letter words in a list of 5 letter words with a string like "*e*d*".  The asterisks represent unknown letters; the e and d, known letters.  I wish to compare this string with each word in the list and discard any words which do not match.  I would end up with a list of matching words eg ["fends", "sends", . . .]   Is there a string function to compare partial matches?  I've looked at the compare and match commands,  but they don't seem applicable.

   Any suggestions would be most appreciated.

Regards, David 

I copy a program from a book and try to run it, but when i try to run it return:

too many levels of recursion

Here is my program:

Hope every one can help me solve this problem. Thank!

I am trying to solve in Maple the system 
d{x}/dt =(1  1 \\1  -1).{x}
with initial conditions {x(0)} =(1 \\ -1),
where {x} is a vector.


This is what I did up to now


with(DEtools):
M1:=<1,1;1,-1>;
matrixDE(M1,t);
FM:=matrixDE(M1,t)[1];


but I am not sure how to correctly input the initial conditions to find a solution to the problem. I would appreciate any help provided.
 

Recently I have used a FilterForge filter to generate hyperbolic tiles from images (Lua code with Möbius transform etc. available). If an input image (1 see below) is selected a tile (2) is generated if the hyperbolic parameters (5,3,2) were chosen.  How could this be made with Maple?

 

The origin of this problem is that I want to bound a norm below. After som assigning of variables etc it boils down to minimizing;

S(x,y,z,w,A,B,E,F,G,H):=A*x^2+A*y^2+B*x^2+B*y^2+(-E*G+F*H+1)*x*z/(1-2*E*G+2*F*H+(F*H)^2+(E*G)^2+(E*H)^2+(F*G)^2-4*E*F*G*H)+(-E*G+F*H+1)*y*w/(1-2*E*G+2*F*H+(F*H)^2+(E*G)^2+(E*H)^2+(F*G)^2-4*E*F*G*H)-(-E*H+F*G)*y*z/(1-2*E*G+2*F*H+(F*H)^2+(E*G)^2+(E*H)^2+(F*G)^2-4*E*F*G*H)-(-E*H+F*G)*x*z/(1-2*E*G+2*F*H+(F*H)^2+(E*G)^2+(E*H)^2+(F*G)^2-4*E*F*G*H)-6*E*x+6*F*y-6*G*z+6*H*w

I first treat the x,y,z,w as coefficents and optimize over them( these are real and imaginary parts of complex parameters of my norm which on paper is a sum).
I use standard way to get the minia w.r.t these 4 variables via "solve". Then I put the solution into the a new function N(A,B,E,F,G,H) and try to optimize that with NLP and get one solution, but this is only local and it has the following message attached to it;

"Warning, no iterations performed as initial point satisfies first-order conditions"

I want a global minima for my polynomial N in 6 variables and I have some constarints on them aswell. Furthermore I put all variables to be real.

What command or package can I use to get this?

How to put programmatically 2 dots above the first and the last digit  as in the example?

http://s017.radikal.ru/i419/1610/55/958cd75b6b34.png

 

Since the new editor for some reason I cannot upload any pictures or files from my computer.

 

Previous year I was using Maple 2015 and I had a procedure in which I had used

A := Array((1 .. 3)$3);

And similar use of $. This year I'm using Maple 2016. Now I came back to my old procedure but Maple doesn't compile the procedure anymore and instead shows

Error, `$` unexpected
What is the problem? Is something changed in new version of Maple?

Why I use Array and $ is my old question here http://www.mapleprimes.com/questions/210628-Undefined-For-Loop-Bound which was fine before.

Hi all, I need a heep to solve 6 PDEs from the first order with initial and boundry conditions.

Here is the file PDE_with_IBC-BC.mwPDE_with_IBC-BC.mw

Hi,

The error "warning bad name, cannot profile...." occurred and I don't know why. Here my minimal example,

test.mw

Does anyone knows the reason?

 

> restart; for j to nops(n) do sys := diff(f(eta), eta, eta, eta)+f(eta)*(diff(f(eta), eta, eta))+1-(diff(f(eta), eta))^2 = 0, (diff(diff(theta(eta), eta), eta))/pr+f(eta)*(diff(theta(eta), eta))-(diff(f(eta), eta))*theta(eta) = 0; bcs := f(0) = 0, (D(f))(0) = l+b*((D@@2)(f))(0), (D(f))(-.5) = 1, theta(0) = 1+s*(D(theta))(-.5), theta(2) = 0; n := [1, 2, 3, 4, 5, 6]; pr := .71; p := 0; q := 0; b := 0; l := 0; s := 0; L := [red, blue, orange]; R1 := 2*n[j]/(1+n[j]); R2 := 2*p/(1+n); p := proc (f1, th1, { output::name := 'number' }) local res1, fvals, thvals, res2; option remember; res1 := dsolve({sys, f(1) = 0, theta(0) = 1+th1, (D(f))(0) = f1, (D(theta))(0) = th1, ((D@@2)(f))(0) = f1-1}, numeric, :-output = listprocedure); fvals := (subs(res1, [seq(diff(f(eta), [`$`(eta, i)]), i = 0 .. 2)]))(0); thvals := (subs(res1, [seq(diff(theta(eta), [`$`(eta, i)]), i = 0 .. 1)]))(0); res2 := dsolve({sys, f(0) = fvals[1], theta(0) = thvals[1], theta(5) = 0, (D(f))(0) = fvals[2], (D(f))(5) = 1}, numeric, :-output = listprocedure); if output = 'number' then [fvals[3]-(subs(res2, diff(f(eta), `$`(eta, 2))))(0), thvals[2]-(subs(res2, diff(theta(eta), eta)))(0)] else res1, res2 end if end proc; p1 := proc (f1, th1) p(args)[1] end proc; p2 := proc (f1, th1) p(args)[2] end proc; p(.3, -.2); par := fsolve([p1, p2], [.3, -.2]); res1, res2 := p(op(par), output = xxx); plots:-display(plots:-odeplot(res1, [[eta, f(eta)], [eta, theta(eta)]]), plots:-odeplot(res2, [[eta, f(eta)], [eta, theta(eta)]])); plots:-display(plots:-odeplot(res1, [[eta, diff(f(eta), eta)], [eta, diff(theta(eta), eta)]]), plots:-odeplot(res2, [[eta, diff(f(eta), eta)], [eta, diff(theta(eta), eta)]])); plots:-display(plots:-odeplot(res1, [[eta, diff(f(eta), eta, eta)]]), plots:-odeplot(res2, [[eta, diff(f(eta), eta, eta)]])); plots:-display(plots:-odeplot(res1, [[eta, diff(f(eta), eta)]])); fplt[j] := plots[odeplot](res1, [eta, diff(diff(f(eta), eta), eta)], color = L[j], axes = boxed); tplt[j] := plots[odeplot](res1, [[eta, theta(eta)]], color = L[j], axes = boxed) end do;
> plots:-display([seq(fplt[j], j = 1 .. nops(n))]);


Dear Sir

In my above problem i trying to plot for set of values of n but in plot command it not executing , can you do this why it is not executing ??

 

ha := (diff(c(t), t))/(c(t)*(diff(c(t), t))-c(t));
solve(subs(m=ha,f(m))*subs(m=subs(c(t)=a(t),ha)), f(m)) = subs(m=ha+subs(c(t)=a(t),ha), f(m), f);

just expect to find a function ?
 

1. How to generate times series data that have some logic law

but do not include distributive law?

Hi @ all,

I was wondering if there is a way to display every character that i type in maple math input without any kind of automatic text editing (neither adding nor removing characters).

I find it very cumbersome to read and edit the modified input (afaik just from looking at a simple piece of printed (black and white on pamper) code it is impossible to destinguish atomic variables and indexed variables due to automatic text edit of the input to lower script in both cases).

 

Example 1: "True" Low Script (Not indexed variable!)
> a__1 :=3:

When I type this in 2-D Math Input (or Maple Input) the cursor jumps to lower script (atomic variable) after the second underscore which is not what i want to happen. After evaluating the expression it is very neat to see the "1" as lower sript but not during typing. Any mode or something to achieve this?

2. Example: Use a loop for dynamic variable creation (not because it is smart to do so but to illustrate my problem with maple input and automated text edit)

> for i from 1 to 4 do:
> x__||i:=1:
> end do:

I can not type this directly in any kind of maple input I have found. The concatenate symbol will be interpreted as subscript without escaping the automatically entered "atomic variable" mode which causes an error. After I use the arrow key to type "||i" outside "atomic variable mode" the loop variable i is not used as index anymore but instead appended to x as a number. But what i want is a dynamic variable creation with "true" numbered subscripts. I could use a longer version with cat() but this sucks (or I simply do not know how to type it properly).

I do not want to use or see atomic variables during input (or any kind of automatic text editing during input for that matter) !

So what I do Instead is I use a texteditor to type away, paste the code to maple and execute it. Works like a charm and my fingers do not have to leave their designated spots on the keyboard and i can type way faster. Furthermore I can always copy the code back to notepad++ and use regex to make a lot of simultaneous replacements at once whereas this is quite difficult with code that i typed in maple.

 

So how do I turn off automated text edit of the input? Or should I use anything else then a worksheet?

Cheers
Zorg

Hi there,

I was wondering how to define the unit of an unspecified function. Here is what I want to do:

Say I have the coordinates of a Point in 1D-Space denoted by an unknown function x(t). While this function depends on time t the value of this function is supposed to be of SI Unit meter.

When calculating diff(x(t),t) I would like to get something like (absolut derivative of x(t)) * Unit(m/s).

So how do i tell maple that x(t) is something like f: time -> meter?
Also: How to specify that t has unit second without breaking the diff() command?

Any help would be greatly appreciated.

Regards

Zorg

> restart;
> n := [1, 2, 3, 4, 5]; pr := .71; p := 0; q := 0; b := 0; l := 0; s := 0;
> for j to nops(n) do R1 := 2*n[j]/(1+n[j]); R2 := 2*p/(1+n); sys := diff(diff(diff(f(eta), eta), eta), eta)+f(eta)*(diff(diff(f(eta), eta), eta))+1-(diff(f(eta), eta))^2 = 0, (diff(diff(theta(eta), eta), eta))/pr+f(eta)*(diff(theta(eta), eta))-R2*(diff(f(eta), eta))*theta(eta) = 0; bcs := f(0) = 0, (D(f))(0) = l+b*((D@@2)(f))(0), (D(f))(-.5) = 1, theta(0) = 1+s*(D(theta))(0), theta(-.5) = 0; proc (f1, th1, { output::name := 'number' }) local res1, fvals, thvals, res2; option remember; res1 := dsolve({sys, f(0) = 0, theta(0) = 1+th1, (D(f))(-2) = f1, (D(theta))(-2) = th1, ((D@@2)(f))(0) = f1-1}, numeric, :-output = listprocedure); fvals := (subs(res1, [seq(diff(f(eta), [`$`(eta, i)]), i = 0 .. 2)]))(0); thvals := (subs(res1, [seq(diff(theta(eta), [`$`(eta, i)]), i = 0 .. 1)]))(0); res2 := dsolve({sys, f(0) = fvals[1], theta(0) = thvals[1], theta(1) = 0, (D(f))(0) = fvals[2], (D(f))(1) = 0}, numeric, :-output = listprocedure); if output = 'number' then [fvals[3]-(subs(res2, diff(f(eta), `$`(eta, 2))))(0), thvals[2]-(subs(res2, diff(theta(eta), eta)))(0)] else res1, res2 end if end proc; p1 := proc (f1, th1) p(args)[1] end proc; p2 := proc (f1, th1) p(args)[2] end proc; p(.3, -.2); par := fsolve([p1, p2], [.3, -.2]); res1, res2 := p(op(par), output = xxx); plots:-display(plots:-odeplot(res1, [[eta, f(eta)], [eta, theta(eta)]]), plots:-odeplot(res2, [[eta, f(eta)], [eta, theta(eta)]])); plots:-display(plots:-odeplot(res1, [[eta, diff(f(eta), eta)], [eta, diff(theta(eta), eta)]]), plots:-odeplot(res2, [[eta, diff(f(eta), eta)], [eta, diff(theta(eta), eta)]])); plots:-display(plots:-odeplot(res1, [[eta, diff(f(eta), eta, eta)]]), plots:-odeplot(res2, [[eta, diff(f(eta), eta, eta)]])); fplt[j] := plots[odeplot](sol1, [eta, diff(diff(f(eta), eta), eta)], color = L[j], axes = boxed); tplt[j] := plots[odeplot](sol1, [[eta, theta(eta)]], color = L[j], axes = boxed) end do;


Dear Sir

In this above problem it showing that error as  Error, cannot split rhs for multiple assignment please can you tell why it is showing like this  ?? and where i did multiple assignments ??

First 1032 1033 1034 1035 1036 1037 1038 Last Page 1034 of 2216