Robert Israel

6577 Reputation

21 Badges

18 years, 209 days
University of British Columbia
Associate Professor Emeritus
North York, Ontario, Canada

MaplePrimes Activity


These are replies submitted by Robert Israel

It should work.  Did you include the definitions of p1 and p2 from your previous message?  My guess is that you've left something out.  For convenience, here it is in one group.  I've cleaned it up a little by removing some unnecessary displays.

> S1:= unapply(u*FresnelS(u)+((1/Pi)*cos((1/2)*Pi*u^2))-(1/Pi),u): 
  C1:= unapply(u*FresnelC(u)-((1/Pi)*sin((1/2)*Pi*u^2)),u): 
  with(plottools): 
  with(plots):
  u0:= sqrt(0.25): 
  e1:= evalf(FresnelC(u0)+FresnelS(u0)*cot((3*Pi)/8)): 
  p1:= plot([FresnelC(u),FresnelS(u),u=0..u0]):
  p2:= plot(x-e1,x=0..1,y=0..1,colour=black):
  p3:= reflect(p1,[[e1,0],[FresnelC(u0),FresnelS(u0)]]):
  display(p1,p2,p3);

Or as a procedure:

> AddList:= rcurry(convert,`+`);
> AddList([a,b,c]);

a+b+c

 

Or as a procedure:

> AddList:= rcurry(convert,`+`);
> AddList([a,b,c]);

a+b+c

 

Another way to avoid complex conjugates is to use Xs^%T . Xs instead of Xs . Xs.

> Xs^%T . Xs;

cos(s)^2*cos(t)^2+cos(s)^2*sin(t)^2+sin(s)^2

> simplify(%);

1

Another way to avoid complex conjugates is to use Xs^%T . Xs instead of Xs . Xs.

> Xs^%T . Xs;

cos(s)^2*cos(t)^2+cos(s)^2*sin(t)^2+sin(s)^2

> simplify(%);

1

You had the equation j = 2 rather than the assignment j := 2.  With j := 2 the "add" version will work.  The "Sum" version won't, because B[i,j] doesn't work if i is symbolic.  You could try delaying evaluation with 'B[i,j]'  instead of B[i,j].

You had the equation j = 2 rather than the assignment j := 2.  With j := 2 the "add" version will work.  The "Sum" version won't, because B[i,j] doesn't work if i is symbolic.  You could try delaying evaluation with 'B[i,j]'  instead of B[i,j].

Or if you want to prevent evaluation rather than just delaying it, you might try (in Standard GUI):

> Sq2:= `#msqrt(mn("2"))`;
  2/Sq2;

Or if you want to prevent evaluation rather than just delaying it, you might try (in Standard GUI):

> Sq2:= `#msqrt(mn("2"))`;
  2/Sq2;

Try:

> 2/'sqrt(2)';

Note the difference between forward quotes ' ' and back-quotes ` `: the former are for delaying evaluation (which is what you want to do here), the latter for making an expression into a name.

Try:

> 2/'sqrt(2)';

Note the difference between forward quotes ' ' and back-quotes ` `: the former are for delaying evaluation (which is what you want to do here), the latter for making an expression into a name.

There are, I think, various different definitions of "positive definite" that all coincide in the hermitian case, but don't in general.  It appears to me that IsDefinite(A) actually works on A + A^%H, so (for real matrices) if you use the criterion that x^%T . A . x > 0 for all nonzero real vectors x,  IsDefinite should give a correct answer.

For example, for a 2 x 2 matrix:

>  with(LinearAlgebra):
   M:= <<1 | 0>, <3 | 1>>;
   Eigenvalues(M);

[   1   ]
[   1   ]

> IsDefinite(M);

false

The Matrix Browser (at least on my computer, in Maple 13 Standard under Windows) seems not to work on an Array or Vector with one dimension greater than 10001.  So if aud is your Array, try

> aud[1..10001];

and then double-click on the result.

The size of the Array should be given in the summary that Maple prints.  For example,

> aud;
                         [ 1 .. 1185295 1-D  Array ]
                         [ Data Type: float[8]     ]
                         [ Storage: rectangular    ]
                         [ Order: C_order          ]

The Matrix Browser (at least on my computer, in Maple 13 Standard under Windows) seems not to work on an Array or Vector with one dimension greater than 10001.  So if aud is your Array, try

> aud[1..10001];

and then double-click on the result.

The size of the Array should be given in the summary that Maple prints.  For example,

> aud;
                         [ 1 .. 1185295 1-D  Array ]
                         [ Data Type: float[8]     ]
                         [ Storage: rectangular    ]
                         [ Order: C_order          ]

First 45 46 47 48 49 50 51 Last Page 47 of 187