Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Hi I'm trying to write a proc to takes a character and a string as inputs and as output tells you how many times the character shows up in the string.
I don't know what is wrong with the code


 s:=proc(Z)

local counts,C,i,L:

for C from "a" to "z" do
counts[C]:= 0:
end do:
L:=length(Z):
for i from 1 to L do
C:=Z[i];
if C >= "a" and C <= "z" then
counts[C] := counts[C] + 1
end if;
print(C,counts):

Please help me to check this procedure for solving complex DAE, I want to plot this error figures

There are some errors for the initial conditions?

restart;
with(plots);
w := 10;
L :=0.001;
R :=1;
u(t) :=exp(I*w*t) + 2* exp(I * 2 * w * t);
daesys:={diff(I3(t),t) = 1/L*u(t), I1(t) = I3(t) + 1/R * u(t), I1(0)=0, I3(0)=0};
dsys1:= map(eq -> (evalc(Re(eq)), evalc(Im(eq))), eval(daesys, {x(t) = xre(t) + I*xim(t), y(t) = yre(t) + I*yim(t)}));

I have contributed another application to the Application Center: "Street-fighting Math".
This interactive Maple document contains a simple street-fighting game and performs a
mathematical analysis of it, involving probability and game theory. 

Digits:=20;

p:=proc() global Digits; Digits:=Digits+5;end proc;

Digits;

Obtained 20 at the end. Which variables has also such property of "recoveriability" after proc call?

How do i properly export textof function via interface(verboseproc=2)+print(smth) for father rewritting for own needs?

I mean with formatting as print do itself?


Hello my brothers and sisters..

 

Well, i have to say im really lost .. i have tried a lot but cant figure this out.. i cant open my math task and it only says "there was problems during the loading process" please help me guys i need this i have spent hours on this. and by the way its maple 15 on a mac.. thank you guys..

After I excute : x^2+2*x+1;   and right click on the output then I saw the CompleteSquare option in the Context Menu but after I write  assume(x>0); and then right click on the output of x^2+2*x+1; then I didn't see this option (and there are only a few options appeared in the Context Menu compared to the case before using assume()). 

Sometimes It cause some inconvenience for me since I used Context Menu on outputs from previous lines in my worksheet...

for example, how to define f(x,y)=sin(x+y) inside a triangle but f(x,y)=0 elsewhere? 

fsolve_test.mw fsolve test

 

 

 

``

restart; Digits := 64

``

 

````Define s as the following function involving a divergent series.

s := proc (x) options operator, arrow; sum((-1)^n*n^(1/n), n = 1 .. x) end proc

proc (x) options operator, arrow; sum((-1)^n*n^(1/n), n = 1 .. x) end proc

(1)

``

``

 

 

``The upper limit point of the partial sums, of s is very slowly convergent.

evalf(s(100))

.211329543346941069485035868216520490712148674852018130412747187

(2)

evalf(s(1000))

.191323989712141370638688981469071803275457219110707245455878532

(3)

evalf(s(10000))

.188320351076950504638897789942367214051161086517598649780487746

(4)

 

``

Let mrb be tthe upper limit point of s as x goes to infinity.

``

mrb := evalf(sum((-1)^n*(n^(1/n)-1), n = 1 .. infinity))

.1878596424620671202485179340542732300559030949001387861720046841

(5)

``

``

``

 

Define f as the following function involving the divergnet series sum((-1)^n*(n^(a/n)-a), n = 1 .. infinity).NULL

``

``

f := proc (a) options operator, arrow; sum((-1)^n*(n^(a/n)-a), n = 1 .. infinity) end proc

proc (a) options operator, arrow; sum((-1)^n*(n^(a/n)-a), n = 1 .. infinity) end proc

(6)

``

``

 

 

``Let c be the value for a in the neighborhood of 26 such that f(a)=mrb.

c := fsolve(eval(f(x)) = mrb, x = 26)

25.71864739101744668471488151161460875040712539231550975094037406

(7)

``

``

 

``The average of the upper and lower limit points of the partil sums of f converges much faster than the  upper limit point of the partial sums of s.

evalf((sum((-1)^n*(n^(c/n)-c), n = 1 .. 100)+sum((-1)^n*(n^(c/n)-c), n = 1 .. 101))*(1/2))

.195238896203546569611605945649919224928195587923897718988014700

(8)

evalf((sum((-1)^n*(n^(c/n)-c), n = 1 .. 1000)+sum((-1)^n*(n^(c/n)-c), n = 1 .. 1001))*(1/2))

.187904922391719396683391551158554482265830937732923110694243700

(9)

evalf((sum((-1)^n*(n^(c/n)-c), n = 1 .. 10000)+sum((-1)^n*(n^(c/n)-c), n = 1 .. 10001))*(1/2))

.187860182910509428926222275077446745338505139578191116998518780

(10)

 

Download Jan72012.mw

I'd like to hear a sound alert when Maple 15 (64bit version, on Windows 7 64bit) finishes the execution of a command.

For example, I have a very lengthy function to simplify. I use

simplify(function,size)

but it takes too long. It would be very helpful for me to hear a sound when this simplification finishes so that I can come back to see the result and go on.

Hi,

I got a worksheed with some dualaxisplots generated in a loop. As it would take some time to rightclick on each of them and export it as eps, I'm searching for a fine solution to automatically export them. For plot(); and display(); I found some nice solutions, but using dualaxisplot, I receive the following error:

Error, (in plots:-dualaxisplot) dual-axis plots are not available for the current interface or device

This...

A simple question. I have this:

k*(2x+y-3z+2)+s*(5x+5y-4z+3)=0

 

And I want to group it by x, y, z, so that I would get:

x*(2k+5s)+y(k+5s)...=0

 

I'm using Maple 11.


Hey, I'm just starting to work with maple and I have no idea how i could restract a,b,c,d,e,f,g,h,i in a 3x3 matrix

problem := ur+dr, {con1, con4, con5}, seq(w[i] = 0 .. 1, i = 1 .. N):
problem_matrix_form := Optimization:-Convert:-AlgebraicForm:-LPToMatrix(problem):

Optimization:-LPSolve(problem, maximize = true);
Optimization:-LPSolve(problem_matrix_form[2 .. 4], maximize = true);



The above trick-conversion method works for all LP and QP problems
However it does not work on NLP problems. I have attached the workshet

First 1626 1627 1628 1629 1630 1631 1632 Last Page 1628 of 2223