Ramakrishnan

Ramakrishnan Vaidyanathan

399 Reputation

13 Badges

11 years, 87 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 replies submitted by Ramakrishnan

@Joe Riel 

Thank you very much for the input to my doubts. These are certainly useful in my present preparation of code for use in visualisation of functions and transformations. Thanks again.

Ramakrishnan V

 

@acer 

Radiobuttons, I will use for different function selections. Thanks.

Ramakrishnan V

@acer 

Thanks. I want the update of expression whenever there is a change in the expression.

Since the code is already in the ChangeE() procedure, to avoid duplication of command, I have replaced  the second code with calling the procedure, ChangeE() and it also works well.

 UpdatePlot := proc()

....
              ChangeE(); # This works as well.
    #     DT:-SetProperty("MathContainer0", ':-expression', q);
    end proc;

@acer

No sir. I have posted. I have not attached this document as you already have now. The command that works here does not work elsewhere. That document I have posted with question

  

@acer 

Thank you very much.

I shall try it out and find string or variable, which one is best. In the present document, it may be little difficult. I shall in any way find out the effect. Thank you very much. It seems the commands are very sensitive at times and i face this problem in mathcontainer. I am sending the same as another question next time.

Thank you very much again.

Ramakrishnan V

@acer

Thank you very much. It is very useful to know about the 'refresh' functionality. String identity for components is certainly more straight forward and clear to understand. cheers.

Ramakrishnan V

@Kitonum 

Great. Your idea of using Explore command for this case is the best. However, if I have to have additional commands for additional components involved in the programme, maybe, I say maybe, embedded components with module application would be better. I have to test it. I am sure if Explore command serves the same purpose, a great many complications will be avoided.

Thank you for the nice new command, I have learnt to use from you.

Cheers.

Ramakrishnan V

@tomleslie

Format , Style, Style Management  and now if I select heading the paragraph style comes and I can do apace adjustments.

If i select any item under P, then paragraph style comes.

If I select any item under C, then character style come in which line specing etc do not come.

 I have now understood the arrangement and it is useful for me to learn now.

Cheers. Thanks. Ramki

@hhdizband 

I think it should be differentiate with respect to x and not y'.

If it is wrt y', then it is a very simple problem by putting x = y'. The problem becomes d [√(1+x^2)] / dx. Maple easily solves it.

For d() /dx, answer already sent by maple prime member Mr.Acer. It solves our problem. 

Cheers.

Ramakrishnan V

 

@JSalisbury

Dear friend,

I tried the code you have sent. It did not work at first. In line 4,  lrange := 6 Pi, a semicolon I added. Then it worked, but the result showed as follows.

          [Length of output exceeds limit of 1000000]
          [Length of output exceeds limit of 1000000]

Can you send your document/worksheet enclosed with your code. 

The code suggested by acer worked excellenet. I have attached that doc for comparison and correction. Thanks for your effort.

Cheers. Ramakrishnan V
 

restart; with(VectorCalculus); with(Student[LinearAlgebra]); with(plots); v[i] := 145000; thetabn := VectorCalculus:-`*`(1/8, Pi); thetavn := VectorCalculus:-`*`(1/6, Pi); k := 10; omegac := .5; lrange := VectorCalculus:-`*`(6, Pi); v[b] := VectorCalculus:-`*`(cos(VectorCalculus:-`*`(2, thetabn)), 1/cos(thetabn)); v[g] := VectorCalculus:-`*`(sin(VectorCalculus:-`*`(2, thetabn)), 1/cos(thetabn)); n := `<,>`(VectorCalculus:-`*`(k, cos(thetabn)), VectorCalculus:-`*`(k, sin(thetabn)), 0); vr := [VectorCalculus:-`*`(v[b], t), VectorCalculus:-`*`(VectorCalculus:-`*`(v[g], sin(VectorCalculus:-`*`(omegac, t))), 1/omegac), VectorCalculus:-`*`(VectorCalculus:-`*`(v[g], cos(VectorCalculus:-`*`(omegac, t))), 1/omegac)]; lambda := VectorCalculus:-`*`(VectorCalculus:-`*`(v[i], cos(thetavn)), 1/cos(thetabn)); pt := [t, 0, VectorCalculus:-`*`(v[g], 1/omegac)]; pline := proc (A) options operator, arrow; display(plottools:-line(eval(pt, t = lrange), eval(pt, t = A), thickness = 3)) end proc; shockplot := PlanePlot(n, caption = "", planeoptions = [colour = blue, transparency = .5], normaloptions = [shape = cylindrical_arrow, colour = red]); t1 := textplot3d([VectorCalculus:-`*`(k, cos(thetabn)), VectorCalculus:-`*`(k, sin(thetabn)), 0, 'n'], align = above); B := animate(pline, [A], A = lrange .. 0, paraminfo = false, background = display(shockplot, t1)); C := animate(spacecurve, [[VectorCalculus:-`*`(v[b], t), VectorCalculus:-`*`(VectorCalculus:-`*`(v[g], sin(VectorCalculus:-`*`(omegac, t))), 1/omegac), VectorCalculus:-`*`(VectorCalculus:-`*`(v[g], cos(VectorCalculus:-`*`(omegac, t))), 1/omegac)], t = 0 .. x, colour = red, thickness = 2], x = 0 .. lrange, paraminfo = false, labels = [" ", zeta, xi], background = display(shockplot, t1, pline(0))); display([B, C], insequence, axes = none, orientation = [-158, -17, 0], scaling = constrained)

 

``

 


 

restart

Digits := 15; print(["Sample", "tDiff", "tDiffPC"]); for i to 10 do t1PC := Now(ProcessClock); t1 := time[real](); for j to 1000 do j := j+1 end do; t2PC := Now(ProcessClock); t2 := time[real](); tDiff := t2-t1; tDiffPC := t2PC-t1PC; v := array([i, tDiff, tDiffPC]); print(v) end do

                 ["Sample", "tDiff", "tDiffPC"]
                      [1, 0.002, Unit(ns)]
                       [2, 0., Unit(ns)]
                      [3, 0.003, Unit(ns)]
                      [4, 0.002, Unit(ns)]
                       [5, 0., Unit(ns)]
                           [6, 0., 0]
                         [7, 0.003, 0]
                       [8, 0., Unit(ns)]
                      [9, 0.002, Unit(ns)]
                         [10, 0.001, 0]
 

(1)

``


 

Download PrecisionAccuracy.mw

@Carl Love 

I understand from your explanation that

The PC timings are more accurate to nanoseconds.

Precision (variation) is due to the processing of inbuilt applications currently running like security apps).

Excellent.

Thank you so much.

@acer 

Dear Sir, I found out the mistake. 
 

t1 := time[real]()

119.603

(1)

"for i = 1 to 1000  i:=i+1  end;"

t2 := time[real]()

119.644

(2)

``

t2-t1

0.41e-1

(3)

Now I again recall the stored time values. (unit: seconds). t1 and t2 are retained for ever until unassigned.

t1

119.603

(4)

``

t2

119.644

(5)

t2-t1

0.41e-1

(6)

``


 

Download timeToRun.mw

It is working fine. Thanks.

Ramakrishnan V

@acer the same t1 value will not be assigned afterwards.

@acer 

Thank you so much.

I tried and got it.

t1 := time[real]();
               "for i = 1 to 1000  i:=i+1  end;"
t2 := time[real]();
                          t2 := 99.705

But t1 is lost and i can not find the difference between t1 and t2.

Could you help me please?

Cheers.

Ramakrishnan
 

t1 := time[real]()

"for i = 1 to 1000  i:=i+1  end;"

t2 := time[real]()

99.705

(1)

t1

t1

(2)

t2

99.705

(3)

t1

t1

(4)

t2-t1

99.705-t1

(5)

t1 := time[real]()

373.384

(6)

``


 

Download timeToRun.mw

 

 

@acer 

Thank you very much. Here I want for only a = 1 and not for varying 'a' values.

Yours is useful for making animation for sinusoidal functions of the form

function = verticalShift + VerticalStretch(Trig.Fn(Frequency*x + HorizontalTranslation)

y = a sin(bx+c)+d

Thank toy so much.

Ramakrishnan V

1 2 3 4 5 6 7 Last Page 3 of 13