Ramakrishnan

Ramakrishnan Vaidyanathan

399 Reputation

13 Badges

10 years, 261 days

Social Networks and Content at Maplesoft.com

With twenty years of Industrial experience and twenty years of teaching experience, I am now as retired Professor, using Maple to teach mathematics subject for students studying X to XII standards. Published XII Mathematics books.

MaplePrimes Activity


These are questions asked by Ramakrishnan


Dear colleagues, Can anyone explain what (a::list,b::list) will be understood by the programme?

I thought the programme is made for only adding the numbers in the list. But it seems there is something more than that, i could not get.

Equn label (6) onwards, I donot understand, how the answer was obtained.

Thanks for explaining.

Ramakrishnan V

with(MathematicalFunctions:-Evalf); -1; addList1 := proc (a::list, b::integer)::integer; local x, i, s; description "add a list of numbers and multiply by a constant"; x := b; s := 0; for i in a do s := s+a[i] end do; s := s*x end proc

proc (a::list, b::integer)::integer; local x, i, s; description "add a list of numbers and multiply by a constant"; x := b; s := 0; for i in a do s := s+a[i] end do; s := s*x end proc

(1)

s := addList1([1, 2, 3, 4], 2)

20

(2)

s := addList1([2, 2, 3, 4], 2)

22

(3)

x := 2 = 2NULL

s := addList1([x, 2, 3, 4], 2)

22

(4)

s := addList1([2, x, 3, 4], 2)

22

(5)

sumList := addList1([4, 3, 1, 3, 4, 3], 2)

26

(6)

s := addList1([4, 3, 1, 3, x, 3, 4, 3], 2)

34

(7)

s := addList1([2, 2, 3, 4], 2)

22

(8)

s := addList1([4, 3, 1, 8, x, 3, 4, 3], 2)

58

(9)

x

2

(10)

``


 

Download Doubt_on_list.mw

Dear friends,


 

 

 

Effect of A and B on z values

``

A

``

B

x values

y = 5

y = 10

y = 15

y = 5

y = 10

y = 15

x = 4

"[ 4 5 1.9]"

"[ 4 10 1.8]"

"[ 4 15 3.2]"

"[ 4 5 2.2]"

"[ 4 5 2.0]"

"[ 4 15 3.3]"

x = 6

"[ 6 5 1.7]"

"[ 6 10 1.5]"

"[ 6 15 2.2]"

"[ 6 5 1.9]"

"[ 6 10 1.7]"

"[ 6 15 2.3]"

x = 8

"[ 8 5 3.0]"

"[ 8 10 1.7]"

"[ 8 15 3.1]"

"[ 8 5 3.2]"

"[ 8 10 1.9]"

"[ 8 15 3.2]"

``

``

Table 1: Effect of Modified Parameters on z output

 

Dear friends.,
I want a suitable plot for the above data. I have given the values as [ x  y  z] for z values to be plotted for the two cases, A and B in the same graph to compare and get the best option x ,    y and A or B .

Mathematically an x vs y vs z plot. Any bar or similar plot is what seems suitable to me.

I could not locate any help for plotting 3D data values in help page.

Any suggestions and solution please.

Thanks.

Ramakrishnan V

NULL


 

Download 3Dplot_given_Data_xyz.mw

Can any one disprove maple answer in the attached document?
If not, what is the conclusion?
 

restart

coulditbe(3*I > 0)

false

(1)

coulditbe(3*I > 0)

false

(2)

coulditbe(3*I < 0)

false

(3)

coulditbe(-2+3*I = 0)

false

(4)

coulditbe(abs(I) > 0)

true

(5)

true

(6)

coulditbe(2+3*I < 0)

true

(7)

``

``

What is your opinion?

My opinion from the above is : When a is real and b is complex, a and b can not be compared.

Like number of goats and number of lions  can not be added to give an answer in number of lions alone or number of goats alone!!
Riemann's function Zeta is a function of Complex number

 

solve(abs(Zeta(s+2*I)) = 0, s)

-2*I+RootOf(Zeta(_Z))

(8)

"(->)"

-2.0000-2.*I

(9)

NULL

solve(Zeta(s+2*I) = 0, s)

-2*I+RootOf(Zeta(_Z))

(10)

"(->)"

-2.0000-2.*I

(11)

What does the above results convey??

Am I correct if i state that 's' should be a complex number only and not a real number.


 

Download s_is_complex.mw

s_is_complex.mw

Doubt_ForLoopSemicolon_doesnot_function_A_ReactantValues.mwWhy the following two loops do not display the curves though they are obtained in these loops as verified by the 21 loops.(***) later in the end of this document!!?
for i to 9 do
for k to 7 do
p1[i, k] := plot(curve[i, k], x = 2.0 .. 5.0, labels = [xlabel, ylabel[k]], labeldirections = ["horizontal", "vertical"], color = [black], linestyle = Linestyle1[1], thickness = Thickness1[1], title = l[i], caption = cat("Fig.", i), legend = Legend[i]); p2[i, k] := plot(curvep[i, k], style = point, color = [black], symbol = [solidcircle, soliddiamond, solidbox, diamond, asterisk], symbolsize = 8);
plots:-display(p1[i, k], p2[i, k]) end do end do;
The following loop also does not display curves!
for i from 10 to 21 do
for k to 7 do
p1[i, k] := plot(curve[i, k], x = 2.0 .. 5.0, labels = [xlabel, ylabel[k]], labeldirections = ["horizontal", "vertical"], color = [black], linestyle = Linestyle1[2], thickness = Thickness1[2], title = l[i], caption = cat("Fig.", i), legend = Legend[i]); p2[i, k] := plot(curvep[i, k], style = point, color = [black], symbol = [solidcircle, soliddiamond, solidbox, diamond, asterisk], symbolsize = 8);
plots:-display(p1[i, k], p2[i, k]) end do end do;
The following loops dispaly the curves
(*** How come the following curves available did not show in the above for do loop?
for k to 7 do plots:-display(p1[1, k], p2[1, k]) end do;
for k to 7 do plots:-display(p1[2, k], p2[2, k]) end do;
for k to 7 do plots:-display(p1[3, k], p2[3, k]) end do;
for k to 7 do plots:-display(p1[4, k], p2[4, k]) end do;
for k to 7 do plots:-display(p1[5, k], p2[5, k]) end do;
for k to 7 do plots:-display(p1[6, k], p2[6, k]) end do;
for k to 7 do plots:-display(p1[7, k], p2[7, k]) end do;
for k to 7 do plots:-display(p1[8, k], p2[8, k]) end do;
for k to 7 do plots:-display(p1[9, k], p2[9, k]) end do;
for k to 7 do plots:-display(p1[10, k], p2[10, k]) end do;
for k to 7 do plots:-display(p1[11, k], p2[11, k]) end do;
for k to 7 do plots:-display(p1[12, k], p2[12, k]) end do;
for k to 7 do plots:-display(p1[13, k], p2[13, k]) end do;
for k to 7 do plots:-display(p1[14, k], p2[14, k]) end do;
for k to 7 do plots:-display(p1[15, k], p2[15, k]) end do;
for k to 7 do plots:-display(p1[16, k], p2[16, k]) end do;
for k to 7 do plots:-display(p1[17, k], p2[17, k]) end do;
for k to 7 do plots:-display(p1[18, k], p2[18, k]) end do;
for k to 7 do plots:-display(p1[19, k], p2[19, k]) end do;
for k to 7 do plots:-display(p1[20, k], p2[20, k]) end do;
for k to 7 do plots:-display(p1[21, k], p2[21, k]) end do;
 

I attach a file in which i get an error though it performs.

I made a for do statement which performs perfectly for one loop, but gives an error "unexpected ',' , though performs (i cld not find the errors!).
What does this error state then? How do i remove when I use semicolon to end statement? Can any one help me. Thanks.
 

Data made for Data[i,j] [k] where i =1,2; j=1..8. Each Data has 6 values. k = 1..6

For each data i got an output list of 6 values using a module;

I made a for do statement which performs but gives an error "unexpected ','.

Can any onr help to find my mistake. Thanks.

 

restart

R1 := "SE2"; BP__ref := 3.93; BTE__optimum := .334; BP := 2.36; BTE := .271; sfc := .308; Data[1, 1] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]
NULL

R2 := "SE2"; BP__ref := 3.93; BTE__optimum := .334; BP := 2.75; BTE := .298; sfc := .282; Data[1, 2] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

R3 := "SE2"; BP__ref := 3.93; BTE__optimum := .334; BP := 3.14; BTE := .318; sfc := .264; Data[1, 3] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

R4 := "SE2"; BP__ref := 3.93; BTE__optimum := .334; BP := 3.53; BTE := .330; sfc := .253; Data[1, 4] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

R5 := "SE2"; BP__ref := 3.93; BTE__optimum := .334; BP := 3.88; BTE := .334; sfc := .249; Data[1, 5] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

R6 := "SE2"; BP__ref := 3.93; BTE__optimum := .334; BP := 3.93; BTE := .334; sfc := .249; Data[1, 6] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

R7 := "SE2"; BP__ref := 3.93; BTE__optimum := .334; BP := 4.32; BTE := .330; sfc := .253; Data[1, 7] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

R8 := "SE2"; BP__ref := 3.93; BTE__optimum := .334; BP := 4.71; BTE := .318; sfc := .264; Data[1, 8] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

NULL

R1 := "4S"; BP__ref := 3.88; BTE__optimum := .383; BP := 2.36; BTE := .323; sfc := .258; Data[2, 1] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

R2 := "4S"; BP__ref := 3.88; BTE__optimum := .383; BP := 2.75; BTE := .350; sfc := .239; Data[2, 2] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

R3 := "4S"; BP__ref := 3.88; BTE__optimum := .383; BP := 3.14; BTE := .369; sfc := .229; Data[2, 3] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

R4 := "4S"; BP__ref := 3.88; BTE__optimum := .383; BP := 3.53; BTE := .380; sfc := .219; Data[2, 4] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

R5 := "4S"; BP__ref := 3.88; BTE__optimum := .383; BP := 3.88; BTE := .383; sfc := .217; Data[2, 5] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

R6 := "4S"; BP__ref := 3.88; BTE__optimum := .383; BP := 3.88; BTE := .383; sfc := .217; Data[2, 6] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

R7 := "4S"; BP__ref := 3.88; BTE__optimum := .383; BP := 4.32; BTE := .378; sfc := .221; Data[2, 7] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

R8 := "4S"; BP__ref := 3.88; BTE__optimum := .383; BP := 4.71; BTE := .365; sfc := .229; Data[2, 8] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

 

``

Data[1, 8][4]

4.71

(1)

``

``

for i to 2 do for j to 8 do y[i, j] := action1:-Mproc(Data[i, j]); print(Data[i, j], y[i, j]) end do end do

["4S", 3.88, .383, 4.71, .365, .229], ["4S", .4311313490, 0.5411807293e-1, 0.3357509744e-1, .4235561571, 0.6183000001e-1]

(2)

NULL

N1 := NULL; for j to 8 do N1 := N1, Data[1, j][4] end do; print(N1)

2.36, 2.75, 3.14, 3.53, 3.88, 3.93, 4.32, 4.71

(3)

for i to 2 do N[i] := NULL; for j to 8 do N[i] := N[i], Data[i, j][4] end do end do; print(N[2])

Error, `,` unexpected

 

N[2]

2.36, 2.75, 3.14, 3.53, 3.88, 3.88, 4.32, 4.71

(4)

N[1]

2.36, 2.75, 3.14, 3.53, 3.88, 3.93, 4.32, 4.71

(5)

``


 

Download Doubt_A_ReactantValues.mw

Doubt_A_ReactantValues.mw

5 6 7 8 9 10 11 Page 7 of 13