maple_user_2017

20 Reputation

One Badge

2 years, 307 days

MaplePrimes Activity


These are questions asked by maple_user_2017

Hello!

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!

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

                      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})

 

Hi,

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:

A)
> 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?

B)
>S:=matrix(3,3,[s11,s12,s13,s21,s22,s23,s31,s32,s33]):
>X:=matrix(3,1,[x1,x2,x3]):
## 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
Ben

 

Hello!

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

This works, but si laborious:
[(A[i,1]>=0)$i=1..3,(A[i,2]>=0)$i=1..3,(A[i,3]>=0)$i=1..3];

works, but result is nested:
[[(A[i,j]>=0)$i=1..3]$j=1..3];

should work, but doesn't - why?
[((A[i,j]>=0)$i=1..3)$j=1..3];

Thanks in advance
Rainer

 

 

Page 1 of 1