Items tagged with procedures procedures Tagged Items Feed

maple procedures

April 22 2012 by jeffb 0

i found this program in mapleprimes 

Hi guys, 

I want to know how to write 2 procedures in order to  construct 2 different complex mappings with polynomials of degree 4 and 5 and tell what the pictures really mean.

Can anyone suggest me or give me hints on how to do this? 

One way I know is to construct meldelbrot as follow: 

mandelbrot:=proc(x,y)

localz,ct,xn,xnold,yn,iter:

Iter:=25:Digits:=10:xn:=x:yn:=y:

for ct from 1 to iter while xn^2+yn^2

Hi everyone,

I am trying to build a function of dsolve/numeric solution which would not include procedures for defining the value of it.

First, I need to extract solution as a 2-d array, which will contain all evaluated points of solution.

Next, I want to define a function from this set of points (like interpolation).

Say, I have an array or list of numbers (2-d points).

Now comes the main question: is there a way to interpolate some...

I am trying to learn how to use Maple by working simple-minded projective geometry problems. I want to define a line in terms of two points, one of which is an intersection of two other lines. Must I define the intersection before using it as an argument, or is there a way to refer to the intersection without bothering to name it, as one might do in OOP by creating an anonymous object to use as an argument of the intersection procedure?

I know Maple has/had opensource ideas behind it, that's why

interface(verboseproc=3)

print(sum)

allows seing source code for function sum, but what if I want to see the source code for local procedures in Statistics module,

for example

print(Statistics[Distribution])

>proc() local T; try if type(args[1],':-ProbabilityDistribution') then if nargs=1 then return eval(args[1...

Hi to all

I am trying to merge two functions into a single graph. I have discovered the "piecewise" function but however I want to be able to manipulate the variables in both functions and plot a 3D graph to determine the results.

this is what I have so far

Z := proc (t)

if subs(p = 25, (100-p)*(1-exp((-1)*.11*t))/(10.00000000*exp((-1)*.11*t)+1)) < CM and 0 < t then subs(p = 25, (100-p)*(1-exp((-1)*.11*t))/(10.00000000*exp((-1)*.11*t)+1))

Following Christopher2222 request, I wrote the following procedures for "exact" cubic Hermite spline interpolation,

p:=proc(x0,p0,m0,x1,p1,m1,x)
local t,d;
d:=x1-x0;
t:=(x-x0)/d;
p0+(d*m0+(3*(p1-p0)-d*(2*m0+m1)+(2*(p0-p1)+d*(m0+m1))*t)*t)*t
end:

pb:=proc(x0,p0,x1,p1,m1,x)
local t,d;
d:=x1-x0;
t:=(x-x0)/d;
p0+(2*(p1-p0)-d*m1+(p0-p1+d*m1)*t)*t
end:

pe:=proc(x0,p0,m0,x1,p1,x...

Inside a procedure, local variables are evaluated only one level. Of what good is this, one might ask?

Well, for one thing it allows you to do checks or manipulations of an unevaluated function call without having that function call be evaluated over again. I mean, for function calls to routines which don't happen to remember earlier results.

This is a revision of an Answer

How can I see the body of Newton procedure in student package?

So, I've defined procedures in a .mw file and now I want to somehow read this file into another worksheet, in order use the aforementioned procedures. Is this doable? I've unsuccessfully tried using the READ command. The error messages I get are :

Error, on line 1, syntax error, character `?` unexpected:

<?xml version="1.0" encoding="UTF-8"?>

Error, while reading ``file.mw``

 

Not sure where to go from here. Any help would be great!

I am using Maple 14 and struggling with writing procedures. Here is an example of what I need to be able to program. I require a procedure which will receive as a parameter a function f(x) and plot that function (say in red) along with the curvature function (say in blue) on the same graph. Sample parameters include the functions f(x)=x^2 or sin(x) or exp(-x^2).

I feel somewhat confident in my maple commands, but procedures are a whole new thing to me. If even a basic...

Using SVD to underst.mw

Hola ev1;
In the procedure PLOTSVD, I get the error
"Error, (in SVDPLOT) invalid input: linearalgebra" SingularValues Expects output value for keyword parameter to Be of type {list (identical (U, S, Vt, list)), identical (U, S, Vt, list)}

There are a few ways to view the source of a Maple procedure, such as by using the commands  showstat and print. And these work as usual for the exports of a module. But for procedures which are declared as local to a module these methods do not work right away since by default modules' contents are opaque.

One way around this is to change a setting, by issuing kernelopts(opaquemodules=false) prior to attempting...

I was very comfortable using printlevel with loops, conditionals and procedures in Maple 13, but recently upgraded to Maple 14.

The problem is that, regardless of printlevel, statements nested more than 1 from the top level of maple do not show. Oddly, this doesn't affect procedures or even nested loops inside procedures. The simple code here demonstrates the problem.

>restart;
>printlevel:=100:
>for i from 1 to 2 do
       for j from 1 to 2 do

Hello,

I am currently trying to build some procedures in Maple that calculate the Legendre-Fenchel transformation for functions that are convex, nonconvex, differentiable and non-differentiable functions. I seem to be ok in the convex case, but cannot seem to find a way of getting Maple to calculate this transformation symbolically for nonconvex functions (both differentiable and non-differentiable). It appears to me that the only way to deal with these cases is to...

1 2 3 4 5 6 7 Last Page 1 of 10