vv

13805 Reputation

20 Badges

9 years, 310 days

MaplePrimes Activity


These are replies submitted by vv

@acer 

The plot component has a delay option (default 100 ms) which seems to be ignored. Do you know why?

Does not help. I wonder if it's only my configuration.

 

Edit. You have posted probably an older version where you forgot to change
cstep to step.
After the correction it works.

@Carl Love 

@Carl Love 

The code does not work in Maple (2016, 64 bit, Win7).

@Carl Love 

Carl, on my computer the animation does not work, all the frames are identical.

PS. How have you included the gif file? In my case a single frame was copied this time.

@Carl Love 

However I think that such an animation could be possible, updating continuously a plot component (the compiled step seems to be fast enough for this). I let somone else to try.

Edit. acer already found a simpler solution using Explore.

BTW, the Explore command is now very powerful and probably should be used more often.

@Carl Love 

You are probably right here, but in our situation the order of the enties is not important provided that it is coherent (and it should be).

@Carl Love 

Iterator uses a one-dimensional Array, for which entries is documented. But it works indeed for Vectors too.

@taro 

Just replace beta[1,2]  with beta__12 or other symbol.

Smith form can be used to find ker(A) in all cases.
An example:

A := Matrix([[1,2*p,2*p^2+2*p],[1,6*p,6*p^2+6*p],[1,2,p]]):
S := SmithForm(A); 

(U,V):=SmithForm(A, p, output=['U', 'V']):   #U.A.V=S
# if p^2+2*p<>0 then X=0
# if p^2+2*p=0, ker(A.V) is generated by
K:=<0,0,1>;
# so, ker(A) is generated by
X0:=V.K;


# Check:
A.X0;  #  = 0  (since p^2+2*p=0)




@logiaco 

@logiaco 

I would suggest to solve by hand this concrete example and show us how the result should be returned by Maple.
Note that you want only nontrivial solutions, so you may consider Determinant(A)=0.

@Carl Love 

1. I'd like to know why did you use depends? Why not simply
B::And(list, satisfies(B-> nops(B)=nops(A)))

2. Is the newer satisfies more efficient than the classical if?
Bij:=proc(A::list,B::list)
if nops(A)<>nops(B) then error "The lists must have same dims" fi;
seq(zip(`[]`, A, convert(b,list)),  b=Iterator:-Permute(B))
end;

3. In the previous Bij procedure, the variable b was not declared local.
It should be local but type(b,`local`) gives false and type(b,`global`) also false. Why?
Edit. Ok, it should be type('b',`local`) , type('b',`global`)  and ==> false and true
but even if global,  a global variable b at top level seems to be not affected.
(I.e. b seems to be still local, but type sees the global variable, since it is not declared explicitely. Is it so?)

 

@robin1234 

It is an ad-hoc shooting method. Because the condition f(1/2)=1/2 is not viable (de ODE is not defined for f(b)=b), | f(1/2)-1/2 | was minimized.

If you have other parameters, just include them in the list parameters (see also my first answer).

PS. Maybe a more natural approach (with the same result) would be:

eqx:=diff(f(b),b,b) = -(1/2)*(6*(diff(f(b), b))*f(b)-8*b*(diff(f(b), b))-2*f(b)+diff(f(b),b)+2)*(diff(f(b),b))/((-b+f(b))*(-1+f(b))):
ic:=f(3/8)=0, D(f)(3/8)=d:
s:=dsolve({eqx,ic},numeric, output=listprocedure, parameters=[d]):
fb:=subs(s,f(b)): #Procedure to evaluate f(b)
bdr:=proc(u) s(parameters=[u]); (fb(1/2)-1/2)^2 end:  # minimize  | f(1/2)-1/2 |
Opt:=Optimization:-NLPSolve(bdr, 2..3);   P:=Opt[2][1];
s(parameters=[P]);

@Markiyan Hirnyk 

I simply don't undertand your position and the double moral stuff. The situation in your link is completely different.
As for the "western" part, I think that we live at almost the same longitude (I am in Romania).

@aamirkhan 

You probably forgot to replace L with K in T10.

(because L is a table; K is the scalar now).

P1x.mw

First 147 148 149 150 151 152 153 Last Page 149 of 176