Question: How do I apply a range of values to a variable in an equation or function?

January 26 2013 arctica1963 10
Maple
1

Hello,

I have created a test document to check an equation and I would like to feed a range of k values (ranging from 0 to say 512) in increments of 1) to the main function, and then plot the result as a graph of Zuncomp (y-axis) vs k(x-axis).

I can verify the values of the function by typing say Zuncomp(0) or Zuncomp(10) etc but how do you run this so that you do Zuncomp(k) to read all values of k and generate the output to plot?

Using Maple 13 (Windows 7) - attached the basic Maple doc to show.

Thanks

Lester


Te := 10000

10000

(1)

g := 9.81

9.81

(2)

upsilon := .25

.25

(3)

E := 10^11

100000000000

(4)

G := 6.67*10^(-11)

0.6670000000e-10

(5)

npts := 1024

1024

(6)

`ρload` := 2800

2800

(7)

`ρwater` := 1030

1030

(8)

`ρmantle` := 3330

3330

(9)

`ρinfill` := `ρload`

2800

(10)

`ρcrust` := `ρload`

2800

(11)

thick := 7100

7100

(12)

meandepth := 4500

4500

(13)

DC := 11370

11370

(14)

Rg := E*Te^3/(12*(1-upsilon^2))

0.8888888889e22

(15)

 

ZL := 35000

35000

(16)

XKINT := 6.259*10^(-6)

0.6259000000e-5

(17)

k := 0, 1 .. (1/2)*npts

0, 1 .. 512

(18)

Zuncomp := proc (k) options operator, arrow; 200000000*Pi*G*(`ρload`-`ρwater`)*exp(-k*XKINT*meandepth) end proc-> 

``

``

Zuncomp(10)(->)55.971

``


Download FAA_isostatic1.mw

Please Wait...