Maple 18 Questions and Posts

These are Posts and Questions associated with the product, Maple 18

At the moment, I am using

>writeto("Result1.txt");

> printf(StringTools[FormatTime]("%c\n"));
Thu Jul 31 14:28:08 2014

# lots of things here

# lots of things here

# lots of things here

>writeto(terminal);

To write a time and date stamp into my result1.txt file.

I understand that I can't write : into file names, but is there a way to writeto file using a more informative file name with date and time, such as,

Result_Thu Jul 31 14-28-08 2014.txt

 

Is that something can be easily formatted?

casper

 

Hi Maple friends.

Is there a Maple function to determine the intersection of two curves? For simple curves where the intersection is clear, I can plot them and use probeinfo to get the approximate intersection values.

But for more complex curves, where the scales are large, or the intersection point is not clear, it is difficult.

ie. intersection of y=x-3 and y=x^2-2*x-1

or intersection of y=x+1 and y=(x+1)/(x-1)

Thanks in advance.

Say sometimes, I need to copy and paste results from Maple output, either in 1D or 2D or self formatted (see this).

Sometimes, it works fine, with just a single ">" sign, like this

> v1:=[
eta[p2] = 0.260 ,
eta[p3] = 0.113 ,
eta[p4] = -0.013 ,
eta[p5] = 0.215 ,
eta[p6] = -0.189 ,
eta[phi2] = 0.020 ,
.......ect
]:

 

But sometimes, it looks like this:

 

> v1:=[
> eta[p2] = 0.260 ,
> eta[p3] = 0.113 ,
> eta[p4] = -0.013 ,
> eta[p5] = 0.215 ,
> eta[p6] = -0.189 ,
> eta[phi2] = 0.020 ,
> .......ect
> ]:

 

Below is a screenshot from what I get when I copy the above synatex into Maple :

 

Personally, when I type in multiple synatex, I tend to use shift+enter, to avoid the use of many ">"s.

 

It does not have any effect in practice, but is there a way to improve this? I dont like seeing many many ">"s.

restart:

a:=0.0000000000000000000000213123123;

evalf[3](a);

I think the above is the same as if I were to change the precision tab, to display 3 decimals.

Is there a way to ask Maple to display it as  (printf(  "%3.3f",a);)

0.000

But I want this as a standard Maple ouput.

and I am not just working with a single scalar, I need something that works for a Vector, Matrix, and perhaps, in general.

 

Thanks,

 

casper

v1:=[
eta[p2] = 0.260 ,
eta[p3] = 0.113 ,
eta[p4] = -0.013 ,
eta[p5] = 0.215 ,
eta[p6] = -0.189 ,
eta[phi2] = 0.020 ,
eta[phi3] = 0.063 ,
eta[phi4] = -0.014 ,
eta[phi5] = -0.414 ,
eta[phi6] = 0.067 ,
mu[p] = 0.466 ,
mu[phi] = -0.169 ,
tau[p3] = -0.000 ,
tau[p4] = 0.000 ,
w[1] = 0.023 ,
w[2] = -0.447 ,
w[3] = -0.110 ,
w[4] = 0.035 ,
w[5] = 0.445
]:

for i to numelems(v1) do
    printf("%a = %3.3f , \n",lhs(v1[i]),rhs(v1[i]));
end do:

This runs and returns:

eta[p2] = 0.260 ,
eta[p3] = 0.113 ,
eta[p4] = -0.013 ,
eta[p5] = 0.215 ,
eta[p6] = -0.189 ,
eta[phi2] = 0.020 ,
eta[phi3] = 0.063 ,
eta[phi4] = -0.014 ,
eta[phi5] = -0.414 ,
eta[phi6] = 0.067 ,
mu[p] = 0.466 ,
mu[phi] = -0.169 ,
tau[p3] = 0.000 ,
tau[p4] = 0.000 ,
w[1] = 0.023 ,
w[2] = -0.447 ,
w[3] = -0.110 ,
w[4] = 0.035 ,
w[5] = 0.445 ,

 

Is there a way to align the qual signs? also to align the decials like this:

 

eta[p2]   =  0.260 ,
eta[p3]   =  0.113 ,
eta[p4]   = -0.013 ,
eta[p5]   =  0.215 ,
eta[p6]   = -0.189 ,
eta[phi2] =  0.020 ,
eta[phi3] =  0.063 ,
eta[phi4] = -0.014 ,
eta[phi5] = -0.414 ,
eta[phi6] =  0.067 ,
mu[p]     =  0.466 ,
mu[phi]   = -0.169 ,
tau[p3]   =   0.000 ,
tau[p4]   =   0.000 ,
w[1]       =   0.023 ,
w[2]       = -0.447 ,
w[3]       = -0.110 ,
w[4]       =  0.035 ,
w[5]       =  0.445 ,

For the negative numbers, I prefer to have 1 space of indentation.

 

Thanks,

 

casper

We deploy Maple to our users using Microsoft App-V; We have been using App-V 4  to successfully deploy Maple for some time. When I package Maple 18 for App-V 5 deployment, when a user launches Maple there is an error "too many levels of recursion".

After clicking OK to clear the error, choosing any of the options on the start screen, e.g. signal processing, simply launches a help screen with the message "no matches found" instead of launching a new worksheet.

App-V is our standard method of deploying applications, and has always worked OK in the past. Do you have any recommendations for packaging Maple 18 via App-V?

Thanks.

 

Hi,

 

  Excuse me, I have a following expression

x^2+x+2;

  I want to replace all x as x+1

x:=x+1 does not work.

Is there any simple solution?

 

Thank you very much in advance

 

 

hi,

   here are  equations like this

 sol := [abs(r)^2+abs(t)^2 = 1, r*conjugate(t)+t*conjugate(r), abs(r) = abs(t)]

when i solve this equations using command solve,the result  is none. and i used r=x+I*y,t=u+I*v in the equations,

sol:=[u^2+v^2+x^2+y^2 = 1, 2*u*x+2*v*y, sqrt(x^2+y^2) = sqrt(u^2+v^2)]

i still can't get a result.why,can you help me.

thanks.

 

a:=Vector([2,3,4,5]);

select[flatten](x->x>=3,a);

This returns a Vector that satisfies the above condition. What's the most efficient way to get the indices of those entries?

For example, a list l:=[2,3,4] that correspond to the a[l] entries that satisfies the above condition.

l:=[2,3,4];

a[l]; # gives the same answer

 

Thanks,

 

casper

Let x:=2*[x_1,x_2,...,x_n];   y:=3*[x_1,x_2,...,x_n]; If I input x+y, it will turn out  5*[2x_1,2x_2,...,2x_n]; But I want to get  5*[x_1,x_2,...,x_n]. What should I do? Thanks!!

Good morning.

 

I request your kind suggestion to my query posted.

 

 

With thanks & Regards

 

M.Anand

Assistant Professor in Mathematics

SR International Institute of Technology,

Hyderabad, Andhra Pradesh, INDIA.

Hi,

I wonder if there is a way to achieve this, say I have 4 Maple worksheets,

sheet1.mw

sheet2.mw

sheet3.mw

sheet4.mw

all of them can run seperately. Each of them runs on lots of data, and takes a big chuck of time. I hope to run them one by one. After each file is completed, save (Export) as PDF file, and move on to the next one.

On my own PC, I use Maple X64 windows version. I have never used the command line, but I suppose that will be done in this version, instead of the GUI version?

On the school server, it's Maple X64 linux version. So it's also has the maple command line version as well as the xmaple version.

 

Thanks,

casper

restart:
seq1:=seq(i,i=1..5);
seq2:=seq(i,i=2..6);
dseq:=seq2-seq1;
seq1:=seq(i,i=1..5);
seq2:=seq(i,i=1..5);
dseq:=seq2-seq1;
seq1:=[seq(i,i=1..5)];
seq2:=[seq(i,i=1..5)];
dseq:=seq2-seq1;

Is that possible to get the differences between two sequences directly? (instead of using a list)

I don't quit understand why the second method would collapse the 0s into just a single value. It's not a set.

 

Thanks,

casper

It says at

http://www.maplesoft.com/products/maple/new_features/maple18/Language_Programming.aspx#random

"When generating matrices and vectors of floats and integers, these flavors are very fast. "

But when I compare the new

time[real](Generate(('Matrix')(float, 300, 300)))

and

time[real](RandomMatrix(300, 300))

I find RandomMatrix over 300 times faster. Am I doing something wrong, or is RandomMatrix still the fastest way to generate random numbers?

 

 

First 61 62 63 64 65 66 67 Page 63 of 68