Items tagged with procedure procedure Tagged Items Feed

Hey there i have written the following code and it gets very slow cause of the output at each step, which is not needed. I only need the arrays at the end of the procedure. Has someone an idea how i can suppress the output for the steps betweend the start and the end of the procedure?

 

restart:
s_1 := 0.779e-1*t^2-.1345*t+.2031:
s_2 := 1.3502*t-6.8742:
s_3 := .1112*t^2-1.5108*t+11.527:
s_4 := 1.9322*t-15.099:
s_5 := -0.178e-1*t^2+2.648*t-22.312:

Hey there,

if sometimes problems with my procedures, so i´m looking for a command which shows me the what the procedure is doing.

The command i´m looking for makes a green output :P. Sadly i forget the command; maybe someone can help me.

Best regards

I wrote the procedure below and i want to plot on one graph for the range lambda = 0 to 60 (x-axis),  beta = 0, beta = 5, beta =10, beta = 15, beta = 20 etc. 

in other words i want to plot Cp vs lambda at different beta values

Can any one assist me in doing this.

_______________________________________________________________________

Cplot := proc (beta, lambda)

local lambda0, Cp;

lambda0 := 0.22e-1*beta^2+(7/1000000000000000)*beta+5.6;

error in procedure

April 24 2012 by tim656 0

i'm writing this program and for some reasons i got this error, here is my code

maplet_error.mw

 

evaluating `"myadd(1)"` produces the error: invalid input: myadd uses a 2nd argument, n, which is missing.

the second question is that my procedure only calculate any integer number from 0 to 9 , is there anyway to get this procedure

to calculate bigger...

I wrote my own maple library. Some of its procedures require the LinearAlgebra-library.

Is there a way to automatically load LinearAlgebra when loading my library? (I tried to use 'use' but it didnt help )
Currently i load my library with

read "/home/..../something.lib";

Is there any good refernce to learn how to write maple libraries the right way? the maple help isnt actually very helpful.

i need help please

April 10 2012 by joannjubin 10

i have a procedure like this 

>f:=x-> A*x^2 - B*x -C:
   Bisection:= proc(f,a,b)
   local c;
   x:=evalf((a+b)/2);
   if abs(evalf(b-a))<=0 then return c; end if;
   if signum(f(c))=signum(f(a)) then
   Bisection(f,c,b);
   else
   Bisection(f,a,c);
   end if;
   end proc;

I need to make a procdeure which checks whether a list L is a palindrome or not. Any help would be appreciated.

Hi,

i want to use "dsolve({ODE1, IC1, IC2},numeric)" in a procedure. But it has some problems with the curly brace. Is there a special command to replace the curly brace?

Thanks

matrix question

April 03 2012 by joannjubin 10

i have 2 matrices :    |1 2 3|     |1 2 3|
                               |4 5 6|     |4 5 6|
i have to multiply there 2 matrices like below

a= (1*6)+(1*5)+(1*4)+(1*3)+(1*2)+(1*1)=21
b= (2*6)+(2*5)+(2*4)+(2*3)+(2*2)+(2*1)=42
c= (3*6)+(3*5)+(3*4)+(3*3)+(3*2)+(3*1)=63

Hi, these are what I have, I'm trying tot get a set of answers.

elenum:=16:

nodes:=elenum*2+1:

L:=evalf((Pi*2)/(elenum*2)):

interface(rtablesize=infinity):

E0:=Matrix([[L/3,2*L/3,L/3)],[(2*L/3,11*L/15,2*L/3)],[(L/11,2*L/3,L/110]]):

for i from 1 to elenum do
node:=(2*(i-1))+1;
E0M[node..node+2,node..node+2]:=E0M[node..node+2,node..node+2]+E0
end do:

E0M:

What should I do if i want a different outcome of...

Merge two sorted lists

April 01 2012 by asghar 0 Maple

Okay so my proff wrote the following procedures to sort a list and they obviosuly work. Now I want to write a procedure that can merge two sorted lists (using SelectSort). I am trying to write merge as a procedure but to no avail. Can anyone help me out?

getListSize := proc (L)

local vv; vv := Vector(L);

return LinearAlgebra[Dimension](vv)

end proc

 

swap := proc (L, i, j)

local temp, vv;

vv := Vector(L);

Hi everybody:

was wondering if someone could help me figure out what change took place in Maple 16 so that the expression shown below does no longer work

A:=a->Matrix(2,2,[[a,3*a],[a,4]])

It worked OK until 15

thanks

karamand

The following simple code

myproc1:=proc({parlist::list:=[]})
return parlist[1];
end proc:

myproc2:=proc(parlist::list)
return myproc1('parlist'=parlist);
end proc:

myproc2([1,2]);

fails with


Error, (in myproc1) invalid subscript selector

The reason is that myproc1 has the optional argument parlist, which has the same name as myproc2. myproc2 seems to make...

write procedure

March 28 2012 by jo88 0

given : A(n+1)=2*A(n) , A(0)=70

write a procedure and find A(5)=?

write a procedure

March 27 2012 by davidp 5

given a recursive sequence : J(n)=b*A(n)  for b=0.5 , A(0)=70% , n is integer

wrote a procedure to find J(n), for example: find J(5)=?

 

i need help with this please .

1 2 3 4 5 6 7 Page 1 of 8