Mohsen

25 Reputation

3 Badges

18 years, 152 days

MaplePrimes Activity


These are answers submitted by Mohsen

Hi Eric;

I think this is a good idea:

 

with(plots);
with(plottools);
omega := 1; k := 5; R := 5; r := 2;
 
plot1 := plot([R*cos(omega*t), R*sin(omega*t), t = 0 .. 2*Pi]);
Epi1 := proc (t)
  display(circle([R*cos(omega*t), R*sin(omega*t)], r, color = red));
end proc;
Epi2 := proc (t)
  display(disk([R*cos(omega*t)+r*cos(k*t), R*sin (omega*t)+r*sin(k*t)], .2, color = blue));
end proc;
print(`output redirected...`); # input placeholder
ani1:=animate(Epi1, [t], t = 0 .. 2*Pi, background = plot1, frames = 50, trace = 0, scaling = constrained):
ani2:=animate(Epi2, [t], t = 0 .. 2*Pi, background = plot1, frames = 50, trace = 50, scaling = constrained):
display([ani1,ani2]);

Hi, f := 5000/(1+99*exp(-.8*t)); g := solve(s = f, t);

You can use blockmatrix command in linalg package.

For example:

 

with(linalg);

n1 := 2; n2 := 2;

A11 := matrix(n1, n1);
A12 := matrix(n1, n2);
A21 := matrix(n2, n1);
A22 := matrix(n2, n2);

A_big := blockmatrix(2, 2, [A11, A12, A21, A22]);
inverse(A_big);

Correct it as follows:

restart; with(student); with(linalg); A := array(evalf([[2, -1, sqrt(2)], [3, 2, -3], [3, sqrt(2), -15/7]])); B := array(evalf([5+7*sqrt(2), -24, -12-3*sqrt(2)])); B := `<,>`(B); print(A); print(B); N := 3; t := 10^(-6); for j to N do for k from j to N do S := 0; for i to N do S := S+A[i, j]*A[i, k] end do; C[k] := S end do; CC := 0; for i to N do CC := CC+A[i, j]*B[i] end do; for i from j to N do A[i, j] := C[i] end do; C[j] := CC end do; P := (1/2)*sqrt(t*N); for i to N do A[i, i] := A[i, i]+P end do; A[1, 1] := sqrt(A[1, 1]); for j from 2 to N do A[1, j] := A[j, 1]/A[1, 1] end do; for i from 2 to N do S := 0; for k to i-1 do S := S+A[k, i]*A[k, i] end do; A[i, i] := sqrt(A[i, i]-S); for j from i+1 to N do S := 0; for k to i-1 do S := S+A[k, i]*A[k, j] end do; A[i, j] := (A[j, i]-S)/A[i, i] end do end do; C[1] := C[1]/A[1, 1]; for i from 2 to N do S := 0; for k to i-1 do S := S+A[k, i]*C[k] end do; C[i] := (C[i]-S)/A[i, i] end do; C[N] := C[N]/A[N, N]; for i from N-1 by -1 to 1 do S := 0; for k from i+1 to N do S := S+A[i, k]*C[k] end do; C[i] := (C[i]-S)/A[i, i] end do; print(C);

Hi, The "Generators" command returns the set of generators in a set. In your Example: with(PolynomialIdeals): J := <{y^2,x*y}>; pd:=PrimeDecomposition(J); is(Generators(pd[1]) subset Generators(pd[2])); #output: true
Change them as follows: dfieldplot(diff(y(x), x) = (1-y(x)^2)/(2+.5*x^2), y(x), x = -2 .. 2, y = -5 .. 5, arrows = SLIM, color = black, dirfield = [5, 5]); dfieldplot(diff(y(x), x) = x*sin(x)/(1+y(x)^2), y(x), x = -6.15 .. 6.15, y = -5 .. 5, arrows = SLIM, color = black, dirfield = [10, 10]);
Hi, you must delete two lines of your procedure : HandleGB :=proc(file) local line, T,L,f,cnt; f:=fopen(file,READ); try T:=table(); #line:=readline(f); #T[cnt]:=parse(line); for cnt do line:=readline(f); if line=0 then break; end if; T[cnt]:=parse(line); end do; finally fclose(f); end try; L:=convert(T,'list'); end;
But your title is about Maple 13 ! However, I think it is important that we see your worksheet. Maybe these changes are relevant to your problem or your code.
did you test it in other version?
Hi, What is contained in your worksheet? This is important,obviously.
Page 1 of 1