Christopher2222

MaplePrimes Activity


These are replies submitted by Christopher2222

@Markiyan Hirnyk thanks, yes only an issue in 2d-math I should have mentioned.  Just maybe some of the caveats one has to deal with when using 2d-math.  I realized later that probably 1d math was immune to that specific situation. Thanks for pointing that out.

In his case evalf provides the simplest answer.

Maybe this is more what you mean? 

In geometrized units c = 1 = 3x10^8 m/s which then means 1 m/s = 1 / (3x10^8)  or  1s=3x10^8m so now all time quantities can be measured in meters. 
And for G=6.674x10^-11 m^3/(s^2 kg) =1  we've already defined our seconds so we can now define our mass in terms of meters.  All our time quantities and mass quantities are defined all in meters ... I think that is more what you're wondering?

I guess what's really throwing me off is your question.  Maybe you could you give another example or rephrase your question?

 

 

I don't quite understand.  It sounds like you're trying to remove the m/s units factor out of the final answer?  In the above example you use, that would show the answer in Joules.  Is that what you want?  Multiply by Unit('s'/'m') ?

a := Ec*c;
                                 /     3       \
                    8            |('m')  ('kg')|
                3 10  Units:-Unit|-------------|
                                 |        3    |
                                 \   ('s')     /
b := a*Unit('s'/'m');
                         8                 
                     3 10  J

 

 

I checked your profile and indeed it does appear everything is gone.  Hopefully Mapleprimes can fix this.  It's possible mapleprimes is experiencing server problems and has taken a server offline, where some accounts are affected.

@nm Usually a programmer will keep to one style or the other and not mix two different styles of programming.  Most times one will stick to a style that they are comfortable with.  The other reason to stick to one style is obviously efficiency.  

Your above foo and bar example.  One code is shorter to write, but sometimes it actually takes longer to execute.  Your example is exactly that.  I ran both codes in a 1000000 cycle loop and the `if` took slightly longer than if else set up.

r := time():
 for i to 1000000 do 
    `if`(3 < 4, foo, bar):
 end do:
time()-r;
                             0.280

r := time():
 for i to 1000000 do 
    if 3 < 4 then 
      foo: 
    else 
      bar:
    fi:
 end do:
time()-r;
                             0.219

 

@taro , no it's not your posts in particular.  It appears blog entries are the posts currently getting hit with spam.

The only improvement Maple can make here is to be able to angle them at any angle.  Perhaps Maple 2017 will have this feature?

Ok I've found a way

with(combinat)
a := [1, 4, 2, 6, 8]:
b := [seq(seq(cat(seq(i[j], j = 1 .. k)), i = permute(a, k)), k = 1 .. nops(a))]:
c := map(parse, b)

select(`<`, c, 50)
                  [1, 4, 2, 6, 8, 14, 12, 16, 18, 41, 42, 46, 48, 21, 24, 26, 28]

sort(%)
         [1, 2, 4, 6, 8, 12, 14, 16, 18, 21, 24, 26, 28, 41, 42, 46, 48]
             

 

 

 

@Markiyan Hirnyk In fact, yes there is a dead link.  Seriously, you could google it and find Jerry tessendorf's article here http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.161.9102&rep=rep1&type=pdf

I realize it might be a lot of work, that's why I suggested it as a challenge.

Yes, it was down for a few hours in the evening for maintenance.  I don't know and can't find any differences that might have happened, everything seems the same.

So we can't animate the field as above around this?

@Preben Alsholm 

@Preben Alsholm as an explicit example, I want to produce the above animation with the additional directional field also being animated

Here's an example field animation to illustrate explicitly what I was asking.

with(DETools):
LVS := [diff(x(t),t)=x(t)*(1-y(t)),diff(y(t),t)=.3*y(t)*(x(t)-1)];
DEplot( LVS, [x(t),y(t)], t=0..12, x=0..3, y=0..2, arrows=comet,
  animatefield=true,numframes=30,dirfield=50);

That is my intention yes.  To have the field animate around the circle as it moves.  I just don't know if we can get Maple to do that?  I would like to see it if we could, just for fun.

Trying in the new version above.  10^6 does still comes up with error.

First 48 49 50 51 52 53 54 Last Page 50 of 162