Items tagged with programming programming Tagged Items Feed

Hi everybody:

I'm going to learn programming with maple 18, are there any good and new pdf files for learn it?

with regards...

 

Hello Forum:

In the Programming Guide, section 14.3 (Programming Guide: Advanced Connectivity), the subsection `Runtime Environment Prerequisites' a sample script is given in order to set up the environment varibales MAPLE and LD_LIBRARY_PATH:

--8><--------------------------------------------------------------------------

#!/bin/sh
export MAPLE="/usr/local/maple"
. $MAPLE/bin/maple -norun
myapp $*


-----------------------------------------------------------------><8-----------

For testing, `my app $*' can be replaced by `printenv': it seems not to work with Maple 2015.

Any hint ?

Thanks in advance,

Jerome

 

Hi,

 

  Suppose I have a file, 1.mw, which includes a subroutine

 

aver:=proc(a,b)

  local res;
  res:=(a+b)/2;

  return res;

end proc:

 

   Now I am writing another file, 2.mw. I would like to load the subroutine, aver, in 1.mw. How shall I write in 2.mw to use that subroutine in 1.mw?

 

Thank you very much

Hello. I have a question. If you can help me, i am pleasure.

Have nice day. :)

 

restart;
soru := proc(n,x)
local top::0;
for x from 2 to n do
top =top+(((x^(2+i))*top)^(1/(n+2-i)));
print(top);
od;
end proc;

 

soru(5,1);

Error, (in soru) illegal use of a formal parameter

Hi all,
can you help in that please?
How can I use this small procedure (root_of_cheb) as a sub-procedure in  the next procedure (EvalInt) ?
is it possible?

restart:
root_of_cheb:=proc(n)
   local xk,b,k:
   xk:=(k,n)->cos((2*k-1)*Pi/(2*n));
   sort([seq(evalf(xk(k,n)),k=1..n)]):
end:
EvalInt:=proc(f,n)
   local xk:
   xk:=(k,n)->cos((2*k-1)*Pi/(2*n));
   evalf((Pi/n)*add(f(xk(i,n)),i=1..n)):
end:

Thank you

Dear all,

I have a question regarding the computation speed of Maple. I'm doing some numerical work with Maple and when I'm not using the build in Maple routines, but write my one routines to solve e.g. a system of partial differential equations using a finite differencing method, it takes Maple sometimes up to two hours to finish the computation. I also noticed that Maple is only using around 30% of my CPU. I know it's more efficient to do numerical work with C++ or other programming languages (at least that's what most people I know are using) but do any of you know some ways to improve the computation speed of Maple or to make it use more of my CPU to do the calculations faster?

1.  a procedure quadsumstats whose input is an integer n. This procedure should return a list of length 

n whose kth  entry is the number of solutions to
x^2 + y^2 = k 
for
1 <= k and k <= n

I am sort of confused as to how to construct that list of length n and how to obtain integer solutions to the equation in maple.

2.

a procedure firstCount(k) that finds the first integer
n
with
k
representations as
"x^2+y^2= n." What does it mean for an integer to have k representations?

 

 

 

 

I need to write a procedure that does the following :

Write a procedure quadsum whose input is an integer n and whose output is a list of pairs of solutions [x,y] to the above formula.

Your procedure should implement the following algorithm.

1 Initialization
Set
"mylist = []."

Start at
x = 0
and
y = 0.

2 Phase A
Increment both
x
and
y
until
"x^2+y^2 >=n."

Phase B
Repeat the following until
x^2>n

If you are above the circle
x^2 + y^2 = n
then go down in unit steps until you are on or below the circle.

If you are on the circle, add the point to the list
"mylist. "

If you are on or below the circle
x^2 + y^2 = n
then go one step to the right. My procedure is as follows: but it runs into an infinite loop(most probably because of the while loop defined inside the while loop). What am I doing incorrectly?

I have atta

 

hello,

i am quite new into programming and i need help with writing a code that determines the largest integer in the list...

Please help..

Thank you 

The algorithm that I need to replicate is as follows:

real function f(x,y)

integer n; real a,b,c,x,y

f<-max(|x|,|y|)

a<-min(|x|,|y|)

for n=1 to 3 do

b<-(a/f)^2

c<-b/(4+b)

f<-f+2*c*f

a<-ca

end for

end function f

How can I define f,a as  functions that I am later using as variables(in f=f+2cf,b=(a/f)^2)? also, is n just a variable for iteration? 

 

In this work we show you what to do with the programming of Embedded Components applied to graphics in the Cartesian plane; from the visualization of a point up to three-dimensional objects and also using the Maple language generare own interactive applications for touch screen technology in mobile devices techniques. Given that computers use multicore and designed algorithms that solve calculus problems with very good performance in time; this brings programming to more complex mathematical structures such as in the linear algebra, analytic geometry and advanced methods in numerical analysis. The graphics will show real-time results for the correct use of the parallel programming undertook to bear the procedural technique is well suited to the data structure, curves and surfaces. Interaction in a single graphical container allowing the teaching and / or research the rapid change of parameters; giving a quick interpretation of the results.

 

FAST_UNT_2015.pdf

Programming_Embedded_Components_for_Graphics_in_Maple.mw

Atte.

L.Araujo C.

Physics Pure

Computer Science

 

 

 

Dear Maple users,

My problem is as follows:

I have a factor base [2,3,5,7,11,33,34,35,36,37,38,39,40]

The numbers from 2 till 11 are primes, the rest is not. 

Then I have to factor (H+c1)(H+c2) in numbers of the factor base , where c1 and c2 go from 1 to some pre-defined limit. H=32 in my case.
And then I have to put the powers of the numbers of the factor base in a matrix. For example: (H+1)(H+1)=33² but also (H+1)(H+1)=3²*11².

That will become in matrix form [0 , 2, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0 ] but also (!) [0 , 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0 ].

This is not what I want! I want no double representations....

What I want is that (H+c1)(H+c2) should be represented in primes in the matrix if possible and else just represented as the other numbers.

 

hope you guys can help me!

Hello

I have a loop with the do structure but there is an error in the loop .

how can I continue the loop by error or disregard it?

How can error of invalid range be corrected FDM.mw

The Embedded Components are containers that currently use industries for modeling complex systems to find viable solutions in real time and thus avoid huge wait times and overload our computer; by this paper should show you how to implement a dynamic worksheet through Embedded Components in Maple; it goes from finding solutions to ordinary differential equations partial; which interact with the researcher using different parameters.
Using graphical programming will find immediate solutions to selected problems in science and engineering criteria of variability and boundary conditions evolving development with buttons on multiple actions.

 

cimac_2014.pdf

(in spanish)

Solutions_of_Differential_Equations_with_Embedded_Components.mw

 

Lenin Araujo Castillo

Physics Pure

Computer Science

 

1 2 3 4 5 6 7 Page 1 of 7