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 replies submitted by Ramakrishnan

@Carl Love .

Thank you very much. It works.

@acer 

Dear sir, Though the following codes given by you , work well in a document directly when specified, I have found difficulties in using the same codes for my use inside procedure or module. The arrow operator does not work. Should I add anything like with(DocumentTools) or Statistics like that. The arrow oerator is copied as an operator  inside the procedurewhen I attempted to copy iin a sprocedure.

BTE := map(u->parse(sprintf("%.3f",u)),
           Matrix(BTE, datatype = anything)):

@tomleslie 

Please find attached doc with proc call which works andwhich does not where there is an error 0 and %1 are not evaluated in module. Hope these two documents help you find the issue and solution.

Thanks.

Ramakrishnan V


 

 

fun := proc (n) local a, b, i, x, dt; dt := .5; a := readstat("insert a"); Threads:-Sleep(dt); b := readstat("insert b"); for i to n do Threads:-Sleep(dt); x[i] := readstat("insert x") end do end proc

fun(3)

``


 

Download readstatExample1.mw

readstatExample1.mw

readstatExampleNW.mw

@acer 

Dear Professor, Thank you so much. It works fine.

Ramakrishnan V
 

``

 

NULL

27.90

(1)

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

BTE := map(proc (u) options operator, arrow; parse(sprintf("%.3f", u)) end proc, Matrix(BTE, datatype = anything))

``

``

NULL

27.90

(2)

NULL


 

Download Doubt_NumberFormat_in_DataTable.mwDoubt_NumberFormat_in_DataTable.mw

@acer 

I have referred only the digits after the decimal point.

I considered that A decimal refers to any digit after the decimal separator, such as in "3.14 is the approximation of π to two decimals".

Sorry for not very clear in my usaget.

%2.3g is what normally i use. What is f stands for? I do not understand the following from help page.

The object is formatted as a fixed point number. The number of digits specified by the precision appears after the decimal point (the six digits, if no precision is specified).

Thank you very much.

Ramakrishnan V
You have considered 6 digits total with 3 after decimal pointer. [099.999 or 99.999 or 999.99 or 099.990 or 99.99 as per data].Am I correctly understood?

@adel-00 

Contour is a locus of points that satisfies all the three expressions here. The expressions given here are lamda1 = numerical values, lamda2 = numerical values and third is a function of Result, lamda1 and lamda2 which should be zero since contours = 0. Since this as an equation, i changed it in to an expression for Results  in terms of lamda1 and lamda2.Then it is simple coding to plot the three expressions as contour. The commands are


Result := (lambda__1*Pi*(lambda__2+1)^2/(4*lambda__2))^.5;
with(plots);
contourplot(Result, lambda__1 = 0 .. 1, lambda__2 = 0 .. 1);
 

@John May 

Dear Professor, It worked very well. I attach the document for just reference. Thanks. Ramakrishnan V


 

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

 

 

y4 := sprintf("\n %-2.5s:        %2.5s:     %2.5s   \n %-2.5g:   %-2.5g       %-3.2g\n", z, y, x, y1, x1, z1)

"
 Maple:        Maple:     Map   
 9.9876:   9.0808       8.1
"

(1)

text := GetProperty("printarea0", value)

"Maple:        Maple:     Map  9.9876:   9.0808       8.1
"

(2)

``

y4

"Maple:        Maple:     Map   
 9.9876:   9.0808       8.1
"

(3)

with(DocumentTools); SetProperty("printarea0", value, cat(text, y4))

``

                                 

 

SetProperty("printarea0", Value, "")NULL

 

 

NULL

 

 

NULL


 

Download FormattedOutput_TextBox.mwFormattedOutput_TextBox.mw

 

@John May 

Thank you very much sir.

Ramaakrishnan V

Hope it is not too late:

I attach a checkboxembedded component examples i made which works. Please see if you can its worth for teaching/use.

Thanks for using.

Ramakrishnan V

CheckBox_ExecutionExample_byVRK_for_forPrime.mw

@John Fredsted 

Thanks to my Professor Robert, I got the answer for my question I want a number of calculations under arithmatic ( a+b and a-b)

adding and subtracting in one statement in module
 

 

action := module () export arithmatic, times;  arithmatic := proc (a, b) options operator, arrow; [a+b, a-b] end proc; times := proc (a, b) options operator, arrow; `mod`(a*b, 5) end proc end module

NULLNULL

NULL

action:-arithmatic(2, 5) = [7, -3]NULL

action:-times(2, 6) = times(2, 6)NULL

``

``

``Thank you all.

Ramakrishnan V

 

NULL


 

Download 2_problems_in_module.mw

@John Fredsted 

Dear John Fredsted, I did not know about usage of 'module inside module' also. I understood from your answer about the term export and how to use export with module. I found an app very useful and was tying to make one similar for curve fitting in my project. I enclose herewith the same though it was from clod i got it. It involves startup code where in everything was programmed using module 'action'. Therefore I wanted to know about it. No problem if this could not be taken up further.

Thank you.RequestHelp_regression_curve_fixing_forData.mw

Ishall

@John Fredsted 

Thank. How is it used. What is the answer ? How is the problem framed for this answer?

n(10) = 20 is the answer ok.

will m1 give the same answer.

will m2 also give the same answer 20. To be specific I want a command to plot sin(x) in a plot0 area embedded area using this.

Hope I am not more confusing. Thanks.

Congratulations. MapleCloud improvements should invite more participants and knowledge sharing among the users.

With more translations, Maple has all the power and potential cover a wider world network.

Cheers.

Ramakrishnan v

@Gillee 

Thanks.

Ramakrishnan V

4 5 6 7 8 9 10 Page 6 of 11