jeffb

0 Reputation

One Badge

12 years, 307 days

MaplePrimes Activity


These are replies submitted by jeffb

this is my input when i used your code 

A:=<<1|2|3>,<4|5|6>>:

B:=<<7|8|9>,<12|15|19>>:

mymatrix(A,B);

received error

this is my input when i used your code 

A:=<<1|2|3>,<4|5|6>>:

B:=<<7|8|9>,<12|15|19>>:

mymatrix(A,B);

received error

i tried to run your code but received error, (in mymatrix) cannot split rhs for multiple assignment 

should numrowsA,numcolsA:=op([1,1],A) instead of op(1,A)

i tried to run your code but received error, (in mymatrix) cannot split rhs for multiple assignment 

should numrowsA,numcolsA:=op([1,1],A) instead of op(1,A)

i tried your way but i received an error Matrix index out of range. LinearAlgebra is a build-in command isn't , i tried to get my procedure to run without using build-in command , but so far it doesn't work without uses LinearAlgebra.

i tried your way but i received an error Matrix index out of range. LinearAlgebra is a build-in command isn't , i tried to get my procedure to run without using build-in command , but so far it doesn't work without uses LinearAlgebra.

so J[0]=0.5*70=35. 

thank you

this is my code 

> owlpop:=proc(n)

  local k, A, S, J;

  A[0]:=70;

  S[0]:=80;

  J[0]:=75;

  for k to n-1 do

  J[k]:=0.5*A[k];

 S[k+1]:= 0.75*J[k];

 A[k+1]:= 0.8*S[k]+0.7*A[k];

 end do;

 print(A[n]); print(S[n]); print(J[n])

 end proc;

> owlpop(0);

            70
            80
            J0

> owlpop(1);

            A1
            S1
            J1

i expected a numerical answer but got these, did i do something wrong in my code? 

          

thank you

thank you

Page 1 of 1