# Items tagged with convertconvert Tagged Items Feed

### Problems with latex2edu and maple graded questions...

February 07 2007
0 1
Sorry for the repetition. I posted this last night as a reply rather than a new posting. I am having difficulty converting latex files with maple-graded questions. It appears that it does not recognize the question type even though the documentation claims that all question types are available with latex. If I try this example or any of the examples in the latex authoring documentation, it generates errors on the latex2edu conversion site.  \documentclass[12pt]{article} \usepackage{ed} \setImageBase{../classes/myclass/images} \begin{document} \begin{topic}{fun} \begin{question}{Maple} 

### Convert units and adopt the new unit in to the val...

January 31 2007
0 4
Using with(Units) If I enter something like: P := 1 [[atm]] And then right click to convert this to torr, it does so like this: P := 1 [[atm]] -> 760 [[torr]] But then, if I check the value of P, it is still given in [[atm]]. How can I make the new units append to the previous value? In general, I'm having a difficult time working with units in Maple. Any suggestions?

### string to list...

January 30 2007
0 2
Hi Short question version: ss := ["abcd", " efg", " hijk", " lm_r", " stuv_k"] How can this be converted to: ss := [abcd, efg, hijk, lm_r, stuv_k] (ie just remove the quotation marks.) Thanks David Longer version: This was meant to be a reply to a previous question posted about 2 days ago, but I have failed to find it. (Sadly I have failed in my attempt to answer his question anyway.) No doubt my lack of being able to successfully use the sort features - are they working properly? (They just seemed to be in a different random order?) restart: ss:="abcd # efg # hijk, lm_r, stuv_k":

January 30 2007
0 1
I'm having a problem to convert my answer to radical term. I've use 'convert' command' but Maple doesn't work. Thank you for your help. >solve({a1^2*alpha+a2^2*beta=a1, 2*a1*a2*alpha+a2^2*gamma=a2, a1*b1*alpha+a2*b2*beta=b1, a1*b2*alpha+a2*b1*alpha+a2*b2*gamma=b2, b1^2*alpha+b2^2*beta=a1+b1, 2*b1*b2*alpha+b2^2*gamma=a2+b2, a1*b2<>b1*a2},{a1,a2,b1,b2}); >convert(%,radical);

### list/sequence values with units...

January 29 2007
0 2
A couple of question on the following snippet.

### Converting "2" into a number...

January 29 2007
0
2
Hi, I am having trouble with the list L:=["2", "abcde"]. I want to get L[1]/4=.5. But L[1] is not a number. How can I convert that? Thanks.

### Making help pages appear as worksheets...

January 28 2007
0 4
I am creating help pages for a package, and want an example worksheet to open as a worksheet rather than a help page. For example, clicking the "Package Overview help page template" hyperlink on the "Templates" help page brings up a worksheet rather than a help page. The mouseover of the hyperlink implies it was saved as a help page (presumably in a help database) rather than as a worksheet. I see the active=true option under INTERFACE_HELP, but am not sure how I convert my worksheet to this form - surely I would lose the formatting styles. An option under "save to database" seems logical, or an active=true option for makehelp, but these do not seem to exist.

### mindless numerical recursion...

January 28 2007 Maple
2
6

Ref: Kahan (Jan 2007): How Futile are Mindless Assessments of Roundoff in Floating-Point Computation ?

I wanted to know, how Maple behaves on the example given in \2475 of that working paper (where other

systems are considered, mostly Matlab) and thought it might be of interest here in the forum.

> restart; Digits:=16; interface(version);

### Bug in convert/hypergeom?...

January 19 2007 Maple
0
1
restart; interface(version);

Classic Worksheet Interface, Maple 10.06, Windows, Oct 2 2006 Build ID 255401

expr:=hypergeom([1-I*a,1-I*b],[1],x);
convert(expr, hypergeom, "lower c");

expr := hypergeom([1 - a I, 1 - b I], [1], x)

0

Digits:=14:
subs(a=1, b=2, c=1, expr):
eval(%,x=2); evalf(%);
#Re(%%%); plot( %, x=-1..0.9); plot( %%, x=1.1 .. 3);

hypergeom([1 - I, 1 - 2 I], [1], 2)

0.010385802579659 + 0.068521539093061 I


### Convert list to string...

January 17 2007
0
4
Hi Am having trouble converting a list to a string. Below is my Maple code: restart: #To read in a list of letters find all #possible words which they can make in #dictionary with(combinat);#, powerset ps:=powerset([a,b,c,a]); #Find all permutations of the letters in each list p1:=permute(ps[10]); #Convert list to string convert(p1[1],string); Final part of Maple output p1 := [[a, a, c], [a, c, a], [c, a, a]] "[a, a, c]" What I really want is "aac" - how do I clear the list parentheses and commas? Thanks David

### converting matlab or c code to maple?...

January 15 2007
0 1
Hi, Is there an easy way to convert Matlab or C code to something that Maple can use? I know CodeGeneration in Maple can go the other way, but can't import into Maple. Thanks! Andy

### unfriendly evalhf: complex powers...

January 14 2007 Maple
0
5
I would expect, that evalhf works for that without 'manual' translation ...

restart;
interface(version);

Classic Worksheet Interface, Maple 10.06, Windows, Oct 2 2006 Build ID 255401

tst1:=proc(a,z) (-z)^(-a); end proc:
evalhf(tst1(1.5, 2.5));

Error, fractional power of a negative

'(-z)^(-a)': '%'= convert(%,exp);

tst2:=proc(a,z) exp(-a*ln(-z)); end proc:
evalhf(tst2(1.5, 2.5));

(-a)
(-z)     = exp(-ln(-z) a)

-9
0.155662521299999988 10   + 0.252982212799999995 I


### Origami angle division...

January 03 2007
0
0

How simple divisions or multiplications of angles can generate usefull ratio of length

> restart:

> with(geometry): _EnvHorizontalName := 'x': _EnvVerticalName := 'y':

Let's start with a square sheet of paper which vertex are named A,B,C,D.

E is any point on the segment CD and alpha is let angle of AD with AE :

> point(A,0,0); point(B,0,1); point(C,1,1); point(D,1,0);
segment(AB, A,B); segment(BC, B,C); segment(CD, C,D); segment(DA, D, A);

### Plotting procedure output...

December 19 2006
0 5
Hi, I was trying to plot a graph in Maplet using for this the output of a procedure. I don´t understand way the plotter element don´t show the procedure output. Can anyone help me? Thanks, João Laudares, Brazil Here is the code: > restart;with(linalg):with(stats[statplots]):with(plots):with(CurveFitting): > GSeidel:=proc(a, prec, nmax) > local n, xnew, i, j, k, m, erro, soma: > global xold,x,y,R2,R3,h,X,Y,vetor,xix,z,p,vetor_erro,vetor_iterada,R4,R5: > n:=rowdim(a): > xold:=vector(n,1): > xnew:=vector(n,1): > erro:=1: > vetor_erro:=vector(nmax); > vetor_erro:=0; > vetor_iterada:=vector(nmax);

### Nice numerical trouble...

December 04 2006 Maple
1
0
Playing with numerics for the hypergeometric function 2F1 i stumbled into the following exactness stuff, where lots of digits are lost and one needs to increase working precision quite a lot to get a good answer: f1 and f2 result from evaluating ugly, but usual transcendent functions, f3 comes through high precision and f0 is the limiting case.
  restart;

hypergeom([1,2+epsilon],[3],z):
'%' = simplify(convert(%,StandardFunctions));
theSol1:=rhs(%):

theSol1 = -2*(z*(1-z)^epsilon*epsilon-1+(1-z)^epsilon)/
z^2/((1-z)^epsilon)/epsilon/(1+epsilon);
is(%);

 First 32 33 34 35 36 37 38 Page 34 of 41
﻿