Ramakrishnan

Ramakrishnan Vaidyanathan

294 Reputation

6 Badges

5 years, 150 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.

MaplePrimes Activity


These are questions asked by Ramakrishnan

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

Please find my error in the doc which produces outputlines always. Is there any otherway (other than view -  show contents and uncheck output which hides all other outputs as well in a programm) by commands, which can suppress these output lines.

Also is there any other way of giving continuously varying inputs (and visible in RotaryGauge ) like sin wave form (0 to 8 to 0 in a period) ?

                                                                                         
with(DocumentTools); for i to 12 do SetProperty("RotaryGauge0", value, 6); SetProperty("RotaryGauge1", value, .66*GetProperty("RotaryGauge0", value))*time*[]; 3^100; GetProperty("RotaryGauge0", value); SetProperty("RotaryGauge0", value, 4); SetProperty("RotaryGauge1", value, .7*GetProperty("RotaryGauge0", value))*time[real](); 3^100; SetProperty("RotaryGauge0", value, 2); SetProperty("RotaryGauge1", value, .5*GetProperty("RotaryGauge0", value))*time[real](); 3^100 end do

515377520732011331036461129765621272702107522001

(1)

``


 

Download varying_input.mwvarying_input.mw

?

Can any one correct my code in module for it to work. The procedure is just add 2 and return.My_Module_Mistake.mw
 

restartaction1:-Mproc(2)

Error, `action1` does not evaluate to a module

 

action1:-Mproc(2)

Error, `action1` does not evaluate to a module

 

with(MathematicalFunctions);
action1:=module ()
        export Mproc,y;
                Mproc:= proc (n)
                        y:=n+2;                
                end proc;
end module()


 

Download My_Module_Mistake.mw

 

I am importing an excel worksheet xlsx file in to a datafile. Though the formatting in excel is perfect with 3 decimals, the data table stores many values in 14 decimals. How do I convert? What is the command? Can any one help me.

I enclose the doc and excel file for reference and use. I tried in many ways, but failed to convert.MP1_Data.xlsxDoubt_NumberFormat_in_DataTable.mw
 

NULL

 

``

27.90

(1)

BTE := evalf(2.3)*Import("E:/A_PhD2017/MP1_Data.xlsx", "Brake_Thermal_Efficiency")

``

``


 

Download Doubt_NumberFormat_in_DataTable.mw

 

I want to obtain a report in a particular table format in TextArea component.REPORT (TextArea)area and ComboBox are not visble here.

Can any one help me? TextBox_Format_Output_Request.mw
 

restart

z := "Maple1"; x := "Map"; y := "Maple2"; x1 := 9.080787; y1 := 9.98765; z1 := 8.090909

I have done it using the print format directly with variable values. This is fine for me.

Maple:        Maple:     Map

  9.9876:   9.0808       8.1

 

I have done it differently defining a variable for the print format. This is fine for me and required as standard.

y3 := "%-2.5s:        %2.5s:     %2.5s\n  %-2.5g:   %-2.5g       %-3.2g\n", z, y, x, y1, x1, z1

printf(y3)

Maple:        Maple:     Map
  9.9876:   9.0808       8.1

 

 

Now I want these two lines as per format print  inside textarea0 named REPORT.

``

                                 

 

SetProperty("REPORT", Value, "")``

 

 

``

 

 

``


 

Download TextBox_Format_Output_Request.mw

I attach the doc for clarity of my odoubt. I have made all the required compoennets commands except for the formatting of printf formaat. Thanks for help.

Ramakrishnan V

4 5 6 7 8 9 10 Page 6 of 11