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.
I would expect, that evalhf works for that without 'manual' translation ...
Classic Worksheet Interface, Maple 10.06, Windows, Oct 2 2006 Build ID 255401
tst1:=proc(a,z) (-z)^(-a); end proc:
Error, fractional power of a negative
'(-z)^(-a)': '%'= convert(%,exp);
tst2:=proc(a,z) exp(-a*ln(-z)); end proc:
(-z) = exp(-ln(-z) a)
0.155662521299999988 10 + 0.252982212799999995 I
How simple divisions or multiplications of angles can generate usefull ratio of length
> 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);
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?
João Laudares, Brazil
Here is the code:
> 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:
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
f1 and f2 result from evaluating ugly, but usual transcendent functions,
f3 comes through high precision and f0 is the limiting case.
'%' = simplify(convert(%,StandardFunctions));
theSol1 = -2*(z*(1-z)^epsilon*epsilon-1+(1-z)^epsilon)/
Why there is no way (except I am stupidly missing something) to let
Maple convert exp(phi*I) to argument with piecewise discussing the
input (as it is explained quite nice in ?argument)?
Even assume(-Pi < phi, phi <= Pi) does not help and results in some
arctan(sin(phi),cos(phi)) and convert(%, piecewise, phi) does not
give the desired presentation.
I'm aware that this probably is not the right place to post this, but is there anybody who can do something about brownstone.net being unreachable? I have to convert a BIG LaTeX-file this weekend for students to work on starting Monday and have been unable to connect for the past twelve hours or so.
So I went ahead with alec's timer code and expanded on that, his window approach was also the approach I would need to furthar push the project to completion, so the beginning is pretty much his code, and works plenty fine.
Now I was working on the project and then realized in order to set things up the way I want, i'm going to have to make a grid layout, also suggested by a fine coder here in a previous help topic, now my problem is, I had to rehaul ALL of my code to use grid layout, grid layout seems like a really easy to use system, and I started converting all the code to comply with that, and in the huge mess of brackets and square brackets, I seem to have messed up the overall opening and closing of said brackets.
I need to export some 3d graphs to eps, then add some text and line, and then use them in a tex document.
There are several problems with the eps produced by maple.
Maple also saves the non-visible parts to the eps. This just makes the file unnessesarily big and slow to work with. Can I stop it from doing this?
The lines of the curves is for some reason composed of thousands of lines on top of eacother. A little piece of a simple line, can consist of 10 thousand lines on top of each other. This makes a simple graph easily consist of 100 thousand lines and very slow to work with. Can I stop it from doing this, and only make the visible line.
My goal is to have users question banks in text files, and then read the data (both text and Maple procedures) in, through the readline function. The problem is, when I use that function, they come out as strings. For instance, if the first line of my file default.txt is
then the command readline("default.txt"); will display
I've tried using the convert function, but I can't find a type that will change it to a procedure. convert(aString,symbol) puts it as a symbol, but when I assign a variable to that symbol all it does it spit the symbol back out, it doesn't execute it. And if I use type(aString,procedure), it makes a procedure which displays the string. I need to remove the double quotes somehow and turn what's inside into a full-fledged Maple procedure. Any ideas?
f:=proc() args end proc:
Error, (in convert/CompSeq) invalid subscript selector
g:=proc(n) if n=3 then true else false fi end:
Error, (in convert/CompSeq) invalid procedure. Can't convert to CompSeq
So I came across the conversion ability in Maple 10 (My school had some trouble with the registry, it's fixed now, so we're up to date with 10!)
Anyways, so I made it convert simple statements and functions, but now my question lies in exactly how deep can this conversion functionality go? Is it possible to say write a java program and convert it into a Maplet and vice versa? I know that Maplet doesn't exactly work like a full blown computer language as alec made clear in his post on the front page, but lets say I wanted to make a window in Maplet, can I convert that from Maplet to java and
I am trying to get students to solve inequalities. They have to enter intervals and I modify their response-string before processing it. Something weird happens when using RegSubs. I have reduced the behaviour to the following maple*-code:
expr := convert("$RESPONSE",string);
This returns true when I enter "(0,25)" (without the quotes of course; you can replace 25 with anything you like). So, instead of the parenthesised .+, the \\1 just yields a 1. When I execute the code in my own Maple10, the correct substitution is made. I think our server runs Maple9. Any comment is appreciated.
Is there some way to get maple to replace "arctan(sin(theta)/cos(theta))" with theta? I know that it doesn't always equal theta :-) but I'm switching to and fro and to and fro, between cartesian and polar coordinates and... As a consenting adult, I'd like maple to trust me to be able to keep track of things myself.
I tried "assume(theta > 0, theta less than Pi/2)" and that didn't help. (Note: I really used the "less than" symbol but for some reason this post gets cut off by that symbol so I wrote it out...)
I also tried "convert(arctan(sin(theta)/cos(theta)),trig)" and "simplify(arctan(sin(theta)/cos(theta)),trig)".
A new version of the File Manager
was just uploaded. This version now can convert more files to HTML in addition to Maple .mw worksheets.
Now if you upload a .txt .mpl, .m, .html, .htm, .maplet, .mm, or .csv file the contents will automatically be converted to HTML. This allows you to view the file directly on MaplePrimes without having to download the file.
You can copy the HTML code into your postings, allowing people to see your text files formatted correctly in your postings.
When you upload an HTML file, the file's formatting is left intact. But the file's <head> section is removed so that when you paste the file in, it will not cause problems with the formatting of the site.