Nathan_Grey

0 Reputation

2 Badges

13 years, 48 days

MaplePrimes Activity


These are questions asked by Nathan_Grey

Here is my code:

restart:
with(LinearAlgebra):with(plots):with(ExcelTools):
n:=0.8:    e:=1:   h2:=0.01:
for N from 20 by 10 to 100 do
for b from 0.01 by 0.05 to 0.26 do
for h from 0.02 by 0.02 to 0.2 do
for h1 from 0.015 by 0.015 to 0.105 do
  A1:=proc(N::posint,b1,e1,h0,h11,h21) local M;
      M:=Matrix(N,(i,j)->if i=j then e elif abs(i-j)=1 then h else 0 fi);
      M[1,2...

Here is my code, I know I am just missing something in the Export (last line) command to make it write the next iteration to a new cell, but nothing I am trying has worked. 

restart:
with(LinearAlgebra):with(plots):with(ExcelTools):

for N from 25 by 5 to 50 do
for b from 0.01 by 0.01 to 0.25 do
for h from 0.02 by 0.02 to 0.2 do
for h1 from 0.015 by 0.005 to 0.1 do
  A1:=proc(N::posint,b1,e1,h0,h11,h21) local M;
      M:=Matrix(N,(i,j...

Is there a way to do a repitition statement with two indices?  Something along the lines of:

for i,j from 1 by 1 to N do a[i][j]:=Re(b[i][3][1][j]); end do; ?

I know that the syntax used here doesn't work, but is there a way to do this?

 

I am trying to set up a procedure for creating a matrix of user specified size.  Basically, I want the user to be able to specify the size and the values of the internal parameters and maple will generate the matrix.  The matrix has the form:

[e   h1   0   0   ...    0]

[h1  e    h   0   ...    0]

[0    h    e   h   ...    0]

...

Page 1 of 1