ndattani

4 years, 278 days


These are questions asked by ndattani

It seems the exponential function needs all arguments in order to be evaluated: a := .2*exp(A[1, 1]+A[1, 2]); A[1, 1] := 2; evalf(a); 0.2 exp(2. + A[1, 2]) However, I would like to be able to see Maple evaluate as much as it can, ie, the above command should give: 1.4778*exp(A[1,2]) Where 0.2 was multiplied by exp(2), and the rest of the exponential was left symbolic. Is there a way to force maple to do this without having to manually factor anything ? Thanks

Hello,

I've performed the exact same calculation (using the exact same worksheet, with absolutely no changes made) last night and today and got these results:

y=[0, .4646313991, .9499094532, .5799050874, .1092604065, .4031507404, .8483735670, .6138799333, .1913933456, .3724618402, .7707837830];

y=[0, .4646313991, .9499094532, .5799050874, .1092604061, .4031507404, .8483735643, .6138799354, .1913933461, .3724618343, .7707837938];

 

Which are exactly the same modulo the last 3 digits.

Digits=10 in both cases.

Hello,

I found this on a website:

------------------------------------------------------------------------------------------------------------------

To clear all variables in Maple and restart without having to reload the application, enter:

restart;

Hello,

If I define two arrays in the following way:

for i from 0 to 2 do

for j from 0 to 2 do

A[i,j]:=[i+j]:

B[i,j]=[i-j]:

od: od:

 

Then if I try to add them and look at the 0,0th component of the result:

C:=evalm(A+B):

C[0,0];

 

I don't get an answer. (I've tried both the LinearAlgebra package and the linalg package.

What would I have to do to get them to add successfully ?

 

Thanks

Hello,

If I have a function:

f(x):=x^2:

And I want

The array: f(x-y) for all x & y  from 0 to 2 with stepsize 0.5

in the same format that matlab stores saved arrays (in a .mat file), is that possible ??

Basically, I would like to be able to open matlab and load an array called 'f' 'from a file generated from maple, such that when I'm in my matlab workspase and type:

f

I get:

n-dimensional sums ?

December 22 2009 by ndattani 549 Maple

I want to do a very high-dimensional sum.

Particularly, this sum, where each of those indices can be either 0 or 1:

http://scienide2.uwaterloo.ca/~ndattani/temp/template.pdf

 

I started doing something like:

sum(sum(sum(sum(R,a[0]=0..1),b[0]=0..1),a[1]=0..1]),b[1]=0..1)

 

But it seems that there must be a better way (one in which I can genarlize to n dimersions). Is such a thing possible in maple ??

 

If I do:

with(CurveFitting):

xydata:=[[0,1],[1,5],[3,9]]:

RationalInterpolation(xydata,x);

I get a rational funciton that goes through those points.

 

What I want to do is interpolate the following function of x:

evalf(int(exp(-a^2 + x),a=0..5);

So, now instead of:

xydata:=[[0,1],[1,5],[3,9]]:

I have something like:

In mathematica when I type:

Manipulate[Plot[Sin[c*x], {x, 0, 10}], {c, 1, 5}]

I get a 2D plot of sin(c*x) for x between 0 and 10, with c =1.

Then with the mouse I can drag a bar which will show what happens when c changes between 1 and 5. I can drag that bar to the particular c value for which the plot looks the way I want.

 

In Sage this can be done using the @interact command.

 

Is there an analog for this sort of thing in Maple ??

 

Thanks a lot!

verify doesn't work for trig ?

December 19 2009 by ndattani 549 Maple

Hello,

does the verify command not work for trig functions ??

verify(sin(x)/cos(x),tan(x),'equal')

gives 'FAIL' rather than 'true'

 

Is there a function for checking whether or not the LHS and RHS of my trig identity match ??

 

 

expand trig formulas

November 29 2009 by ndattani 549 Maple

I couldn't find a clean expression for cos(x/3) in terms of cos(x) on the web,

is it possible to force maple to expand such a thing in terms of cos(x) ??

I've tried basic things like simply(cos(x/3)), and expand(cos(x/3)) , but it seems like Maple won't know what to do (there's an infinite number of choices here) if I don't TELL it to write it in terms of cos(x) somehow.

 

Is there a way to do such a thing??

 

many thanks.

Hello,

I have a symbolic function, and I want to see its pointwise numerical evaluation in fortran format.

Basically, if I have a function like e^x, I want an array like:

  2.7183d+000
  7.3891d+000
  2.0086d+001
  5.4598d+001
  1.4841d+002
  4.0343d+002
  1.0966d+003
  2.9810d+003
  8.1031d+003
  2.2026d+004

What I tried doing was:

-----

I type in:

--------------------------------------------------------------------

RET := λbar*R :

RET[Sigma] := cos(RET)+RET*sin(RET):

C6[Sigma]+(C3[Sigma]*RET[Sigma])^2/(4*De);

--------------------------------------------------------------------

It displays fine on my GUI, but when I copy and paste it into a text editor I get:

RET := λbar*R :

RET[Sigma] := cos(RET)+RET*sin(RET):

C6[Sigma]+(C*3[Sigma]*RE*T[Sigma])^2/(4*De);

--------------------------------------------------------------------

Addition Chains

August 03 2009 by ndattani 549 Maple

Is it possible to compute possible addition chains for an integer in maple ??

If not, is there ANY software that will do it ??

It looks like, choosing a public key exponent with a smaller addition chain makes  RSA decryption more efficient .. but how to know whether or not your exponent has a small addition chain!

From format->autoexecute , I wanted to press "clear" but accidentally pressed "clear all" ... now all 200 of my autoexecuted functions (which were very carefully placed and is not easy to remember which ones they were!) have been removed and pressing edit->undo does NOTHING!

I'm so lucky that I save my maple worksheets every time I make big changes (so I have maybe 36 versions of this worksheet!) .... but should maple not be able to "undo" somehting THAT simple!

 

change variable name

June 13 2009 by ndattani 549 Maple
<p>Once I have defined a complicated expression, and then I realize that the variable x should have initially been named r , can I change x into r in such a way that when i view the expression, it is expressed in terms of r rather than x ?? Without going back and changing EVERY x into an r ??  If i do r=x or x=r and then view the expression it still displays everything in terms of x rather than r.</p>
<p>Also, maple's fortran code generator renames my variables s~ ,t~ and g~ into c1,c2 and c3,  </p>
<p>can I customize what it renames them as ??</p>
1 2 3 Page 1 of 3