20 Reputation

One Badge

6 years, 206 days

MaplePrimes Activity

These are questions asked by maple_user_2017


How can I make MAPLE to put out the numerical solution of the following system?
(a =0.12, c = 47.04)  Neither solve nor fsolve does the job!

Thank for your help!


                      S := t -> c*exp(-a*t)+18

> sys:={S(2)=55,S(8)=36};

        sys := {c*exp(-8*a)+18 = 36, c*exp(-2*a)+18 = 55}

> solve(sys);

         {a = -1/2*ln(18/37*RootOf(18*_Z^3-37)^2), c = 37*RootOf(18*_Z^3-37)}

> fsolve(sys);

         fsolve({c*exp(-8*a)+18 = 36, c*exp(-2*a)+18 = 55},{a, c})



I'm searching for an easier way to execute the following computation using only matrix calculations
(meaning no programming, no loops):

> restart:with(linalg):
> S:=matrix(3,3,[s11,s12,s13,s21,s22,s23,s31,s32,s33]):
> X:=matrix(3,1,[x1,x2,x3]):
> A:=array(1..3,1..3):
> for j from 1 to 3 do
>   for i from 1 to 3 do
>     A[i,j]:=S[i,j]/X[j,1]
>   od;
> od;
> op(A);

So far, I've got the following ideas:

> S:=matrix(3,3,[s11,s12,s13,s21,s22,s23,s31,s32,s33]):
> X:=matrix(3,1,[x1,x2,x3]):
> h:=matrix(1,3,[1,1,1]):
> Xm:=evalm(transpose(h)&*transpose(X)):
## memberwise division: S / Xm   

How can I do a memberwise division?

## make X the diagonal of a square matrix
> Xd:=matrix(3,3,[x1,0,0,0,x2,0,0,0,x3]):
> A:=evalm(S&*inverse(Xd));

How can I make a vector X the diagonal of a square matrix (without retyping the values)?

Thanks in advance



How can I make a list containing all inequalities
A[i,j] >=0 where A is a nxm-matrix?

This works, but si laborious:

works, but result is nested:

should work, but doesn't - why?

Thanks in advance



Page 1 of 1