gkokovidis

2148 Reputation

11 Badges

15 years, 265 days
Draeger Medical Systems, Inc.

 

 

Regards,
Georgios Kokovidis
Dräger Medical

MaplePrimes Activity


These are answers submitted by gkokovidis

Your X and Y are the same, so plotting one against the othter does not make much sense unless you are looking for a straight line (which you are not).

The attached plots one of your data sets.  Is this what you want?

Plot.mw
You can also use the command dataplot, like this:

dataplot(1..110,X);

which will yield the same plot as in the attached file.


Regards,

Georgios

 

Which version of Maple are you using, and what commands have you entered that give you a parabola?

restart:
with(plots,implicitplot):
implicitplot(x^2+y^2=1,x=-1..1,y=-1..1);

will draw a circle.  Depending on your version of Maple, you might have to use the scaling=constrained option at the end, like this:

implicitplot(x^2+y^2=1,x=-1..1,y=-1..1,scaling=constrained);

Can you post your code so we have an idea of what is causing you problems.

Regards,

Georgios

Maple does show an answer.  odeplot does not show your plot because you are missing with(plots) at the beginning of your worksheet.

If you do not want to load the plots package, call odeplot like this:

plots:-odeplot(sol_num, [t, phi1(t), epsilon(t)], t = 0 .. 0.5)

The error is due to how you are using odetest.  Try commenting it out for now, and rerun you worksheet.

Regards,

Georgios

 

From the Maplesoft site:  https://www.maplesoft.com/applications/view.aspx?SID=3473&view=html

Use this as a starting point.

 

//Georgios

Adding to what was answered already, with an example that you can modify for your own puposes.

restart:with(Student[Calculus1]):

eq := sqrt(3)*exp(-t/2)*sin(sqrt(3)*t/2)/3;
 

(1/3)*3^(1/2)*exp(-(1/2)*t)*sin((1/2)*3^(1/2)*t)

                                                                                                                                                           (1)

plot(eq,t=0..20,y=0.3..-0.3);

 

ans:=Roots(eq,0..20);

[0, (2/3)*Pi*3^(1/2), (4/3)*Pi*3^(1/2), 2*Pi*3^(1/2), (8/3)*Pi*3^(1/2), (10/3)*Pi*3^(1/2)]

                                                                                                     (2)

NumberOfZeroCrossingsOverGivenRange:=nops(ans);

6

                                                                                                                              (3)

 

Download ZeroCrossing.mw

Upload your code, so we can look at it.  

If you are creating a code region in Maple, and want to have multiple lines, then you must use the "Shift-Enter" key combination to go to the next line, and continue to do so until the end of your program.

You can use an external editor, save your file, and read it into Maple.

Another option is to use an external editor, and then cut and paste the code, and then execute.

Regards,

Georgios

Below is my interpretation of what the OP is trying to do.  I'm not sure if the word Vector is relevant here.

The attached creates a sequence of points, like acer shows, spaced at 0.5.  Then there is a function mapped to these

points ( 5*x^2+3).  Then x and y are plotted against each other.   

restart:

x:=[seq(0..20,0.5)];

[0, .5, 1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0, 4.5, 5.0, 5.5, 6.0, 6.5, 7.0, 7.5, 8.0, 8.5, 9.0, 9.5, 10.0, 10.5, 11.0, 11.5, 12.0, 12.5, 13.0, 13.5, 14.0, 14.5, 15.0, 15.5, 16.0, 16.5, 17.0, 17.5, 18.0, 18.5, 19.0, 19.5, 20.0]

(1)

y:=[seq(5*i^2+3,i=x)];

[3, 4.25, 8.00, 14.25, 23.00, 34.25, 48.00, 64.25, 83.00, 104.25, 128.00, 154.25, 183.00, 214.25, 248.00, 284.25, 323.00, 364.25, 408.00, 454.25, 503.00, 554.25, 608.00, 664.25, 723.00, 784.25, 848.00, 914.25, 983.00, 1054.25, 1128.00, 1204.25, 1283.00, 1364.25, 1448.00, 1534.25, 1623.00, 1714.25, 1808.00, 1904.25, 2003.00]

(2)

xylist := zip( (x,y) -> [x,y], x, y);

[[0, 3], [.5, 4.25], [1.0, 8.00], [1.5, 14.25], [2.0, 23.00], [2.5, 34.25], [3.0, 48.00], [3.5, 64.25], [4.0, 83.00], [4.5, 104.25], [5.0, 128.00], [5.5, 154.25], [6.0, 183.00], [6.5, 214.25], [7.0, 248.00], [7.5, 284.25], [8.0, 323.00], [8.5, 364.25], [9.0, 408.00], [9.5, 454.25], [10.0, 503.00], [10.5, 554.25], [11.0, 608.00], [11.5, 664.25], [12.0, 723.00], [12.5, 784.25], [13.0, 848.00], [13.5, 914.25], [14.0, 983.00], [14.5, 1054.25], [15.0, 1128.00], [15.5, 1204.25], [16.0, 1283.00], [16.5, 1364.25], [17.0, 1448.00], [17.5, 1534.25], [18.0, 1623.00], [18.5, 1714.25], [19.0, 1808.00], [19.5, 1904.25], [20.0, 2003.00]]

(3)

plot(xylist);

 

 

Download plotFuncData.mw

@digerdiga The procedure by Preben Alsholm, from a previous posting here, does what you are looking for.

Regards,

Georgios

restart: with(plots):

f:=(x)->-(2.50000000000000000000000000000*(-2.424176758*10^30*x^5+5.982448001*10^29*x^3+(5.336360731*10^33*I)*exp((4.0405213687327619451756171962*I)/x)+(3.144879905*10^98*I)*exp((48.6318841588794957405477169504*I)/x)+(8.489643736*10^35*I)*exp((4.04052136873276194517561719622*I)/x)))*x^6/((1.009157478*10^101*I)*exp((48.6318841588794957405477169504*I)/x)*x^6-2.760182453*10^32*x^11-(7.651751413*10^37*I)*exp((4.0405213687327619451756171962*I)/x)*x^4+1.887831524*10^32*x^9-(8.567811466*10^36*I)*exp((4.04052136873276194517561719622*I)/x)*x^4-(1.207009672*10^100*I)*exp((48.6318841588794957405477169504*I)/x)*x^4+(6.538572988*10^29*I)*x^6+(1.246166933*10^31*I)*x^10-1.837651455*10^31*x^7+(1.504191760*10^38*I)*exp((4.04052136873276194517561719622*I)/x)*x^6+1.574891043*10^34*exp((4.0405213687327619451756171962*I)/x)*x^5-(7.612867062*10^30*I)*x^8+4.556143298*10^99*exp((48.6318841588794957405477169504*I)/x)*x^5-(2.488678360*10^105*I)*exp((52.6724055276122576857233341466*I)/x)+6.791123646*10^36*exp((4.04052136873276194517561719622*I)/x)*x^5-3.454612059*10^36*exp((4.0405213687327619451756171962*I)/x)*x^3-4.710342238*10^98*exp((48.6318841588794957405477169504*I)/x)*x^3+(3.488285966*10^35*I)*exp((4.0405213687327619451756171962*I)/x)*x^6+5.512268188*10^106*exp((52.6724055276122576857233341466*I)/x)*x);

complexplot(f,0.2..0.4);

Regards,

Georgios

 

All files from the book can be found on the Springer web site.  Link below.  Available for Maple 5 and 6.  

http://extras.springer.com/2000/978-0-8176-4119-1/Maple_6

Regards,

Georgios

 

You can assign the output, and then extract the p-value.  Test example attached.

restart:with(Statistics):infolevel[Statistics] := 1:

Data2 := [[65., 77.], [61., 74.], [81., 80.], [88., 76.]];

[[65., 77.], [61., 74.], [81., 80.], [88., 76.]]

(1)

X2:=[seq(Data2[i,1],i=1..nops(Data2))];

[65., 61., 81., 88.]

(2)

Y2:=[seq(Data2[i,2],i=1..nops(Data2))];

[77., 74., 80., 76.]

(3)

ans:=TwoSampleTTest(X2, Y2, 0, confidence = .95);

Standard T-Test on Two Samples (Unequal Variances)

--------------------------------------------------
Null Hypothesis:
Sample drawn from populations with difference of means equal to 0
Alt. Hypothesis:
Sample drawn from population with difference of means not equal to 0
Sample sizes:            4, 4
Sample means:            73.75, 76.75
Sample standard devs.:   12.842, 2.5
Difference in means:     -3
Distribution:            StudentT(3.22706145179607)
Computed statistic:      -0.458608
Computed pvalue:         0.675655
Confidence interval:     -23.0134910663555 .. 17.0134910663555
                         (difference of population means)
Result: [Accepted]
This statistical test does not provide enough evidence to conclude that the null hypothesis is false

 

hypothesis = true, confidenceinterval = HFloat(-23.013491066355524) .. HFloat(17.013491066355524), distribution = StudentT(HFloat(3.227061451796068)), pvalue = HFloat(0.6756552452824065), statistic = HFloat(-0.45860802898049535)

(4)

ans;

hypothesis = true, confidenceinterval = HFloat(-23.013491066355524) .. HFloat(17.013491066355524), distribution = StudentT(HFloat(3.227061451796068)), pvalue = HFloat(0.6756552452824065), statistic = HFloat(-0.45860802898049535)

(5)

ans[4];

pvalue = HFloat(0.6756552452824065)

(6)

rhs(ans[4]);

HFloat(0.6756552452824065)

(7)

 

Download ttest_pvalue.mw

Regards,

Georgios

evalf((1/2)*Pi+I*ln(5+2*sqrt(6)));

you can also change your limits from 0 to 5.0, like this x=0..5.0, and your should get a floating point answer as well.

Regards,

Georgios

It is not clear from your table which of the columns are the ones of interest.  The code below can be modified to give you what you are looking for.  It works with older versions of Maple as well.  The data for this example is in a file on my Windows desktop.  Your data can be anywhere you like, as long as your path in the worksheet matches.  For this example, I left the semicolons at the end of the lines that starts with Data:=, and x:=, y1:= ... just to show that the file was loaded.  Once I know this, I would replace it with a colon, just to avoid the clutter of having all of the data shown in the worksheet.
 

restart:with(plots):

Data:=readdata("c:/Users/kokoge00/Desktop/methods.dat",float,10);

[[.1, 0.769540597e-1, .1477783335, .1393069312, 0.763361154e-1, .1477867626, .1393072151, 0.763361266e-1, .1477867830, .1393071934], [.3, .1093424148, .1120401102, .1509302274, .1072278404, .1121142033, .1509369166, .1072278479, .1121142168, .1509369024], [.5, .1392030568, 0.853083077e-1, .1558066181, .1353291378, 0.855066806e-1, .1558355785, .1353291558, 0.8550671332e-1, .1558355439], [.7, .1662374563, 0.652194693e-1, .1562235596, .1604342222, 0.655908735e-1, .1562974878, .1604342352, 0.6559089617e-1, .1562974637], [.9, .1903821623, 0.500537619e-1, .1537887672, .1825594352, 0.506356391e-1, .1539346707, .1825594528, 0.5063567192e-1, .1539346352], [1.1, .2117168860, 0.385555127e-1, .1496220815, .2018541863, 0.393727175e-1, .1498707561, .2018542024, 0.3937274753e-1, .1498707234], [1.3, .2303874000, 0.298096396e-1, .1444864012, .2185409755, 0.308687065e-1, .1448804021, .2185409880, 0.3086872986e-1, .1448803765], [1.5, .2465077820, 0.231661161e-1, .1388614678, .2328759081, 0.244336214e-1, .1394893808, .2328759200, 0.2443364533e-1, .1394893543]]

(1)

x:=[seq(Data[i,1],i=1..nops(Data))];

[.1, .3, .5, .7, .9, 1.1, 1.3, 1.5]

(2)

y1:=[seq(Data[i,2],i=1..nops(Data))];

[0.769540597e-1, .1093424148, .1392030568, .1662374563, .1903821623, .2117168860, .2303874000, .2465077820]

(3)

y2:=[seq(Data[i,3],i=1..nops(Data))];

[.1477783335, .1120401102, 0.853083077e-1, 0.652194693e-1, 0.500537619e-1, 0.385555127e-1, 0.298096396e-1, 0.231661161e-1]

(4)

y3:=[seq(Data[i,4],i=1..nops(Data))];

[.1393069312, .1509302274, .1558066181, .1562235596, .1537887672, .1496220815, .1444864012, .1388614678]

(5)

p1:=plot(x,y1,color=red):

p2:=plot(x,y2,color=blue):

p3:=plot(x,y3,color=green):

display(p1,p2,p3,gridlines=true);

 

Download dataIO_Column.mw

@asukumari The folling links are useful for examples.

https://www.maplesoft.com/applications/view.aspx?SID=1558&view=html

http://math.pnw.edu/~rlkraft/mfmm/pdf/Worksheet14.pdf

https://www.mapleprimes.com/questions/138251-An-Example-Of-A-While-Loop

There are documents on the web.  Google search for "Maple while loop examples"

If you are looking to do something specific with a while loop, let us know.

Regards,

Georgios

Change the 5 to 5. or 5.0, which will give you a floating point approximation in your answer, which is what the call to evalf is doing in your third line.

eval(f, x = 5.0);

Regards,

Georgios

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