gkokovidis

2370 Reputation

13 Badges

20 years, 287 days
Draeger Medical Systems, Inc.

 

 

Regards,
Georgios Kokovidis
Dräger Medical

MaplePrimes Activity


These are answers submitted by gkokovidis

Use your own data for vectors X and Y below: > restart: > with(Statistics): > X := Vector([1, 2, 3, 4, 5, 6], datatype=float): > Y := Vector([2, 3, 4.8, 10.2, 15.6, 30.9], datatype=float): > func:=Fit(a+b*t^2, X, Y, t); > int(func,t); > int(func,t=0..6); #to get the area The function you use is up to you. Whatever works best for your particular data types. Integrate over the range to get the area. See also help pages for: > ?simpson > ?trapezoid Regards, Georgios Kokovidis
From the help command: In the default case (no particular method specified), the problem is first passed to NAG integration routines if Digits is not too large (that is, if Digits <= evalhf(Digits)). The NAG routines are in a compiled C library and hence operate at hardware floating-point speed. evalf(Int(sin(x), x = 0..10 )); Regards, Georgios Kokovidis
Try the following: > ans:=(3+4*I); ans := 3 + 4 I > type(ans,realcons); false > type(ans,complex); true Regards, Georgios Kokovidis Dräger Medical
with(LinearAlgebra): A := Vector[row]([3, 4]); C := Norm(A,2); Try a search in the beta primes site for norm. Your specific question has been addressed in the past with details. Regards, Georgios Kokovidis
Using your last example, the "and" command allows you to cascade a number of "is" statements and get the correct answer. is(5+3*I = polar(sqrt(5^2+3^2), arctan(3/5))) and is(5+3*I = sqrt(5^2+3^2)*exp(I*arctan(3/5))); This retruns true, as it should. Regards, Georgios Kokovidis
Greetings Amini. Do a Google search for "maple advisor database" This is a project at the University of British Columbia under the direction of Dr. Robert Israel. He has written some excellent Maple utilities. Pick your version of Maple that is supported, and scroll down until you see the errorbar() function. I tried it and it works well. Their are copyright issues, so if it is for professional use you should contact the author of the tool. Regards, Georgios Kokovidis
The labels=["",""] removes the x label under the x-axis. The rest allows "special characters" as a temporary workaround. I don't know about the tilde. Play with the textplot command to re-position the text. This is for version 10 of Maple. > restart:with(plots): > f:=x->sin(x); > a:=plot(f(x),x=0..2*Pi,labels=["",""]): > b:=textplot([3.3,.7,"sin(x),x=0->2"],font=[TIMES,ROMAN,12]): > c:=textplot([4.0,.7,"p"],font=[SYMBOL,12]): > display(a,b,c); Regards, Georgios Kokovidis Dräger Medical
At the beginning of your worksheet add the statement: > with(plots): Then continue with the rest of your worksheet just like you are doing. Regards, Georgios Kokovidis Dräger Medical
Greetings, could you execute the following Maple commands and reply back as to which one of the two (A or B) represents the function of interest. The answers are quite different. A:=5*exp(((-x^3)-x*y/3-y^2/3)*cos(x)*sin(y)); or B:=5*exp((-x^3)-x*y/3-y^2/3)*cos(x)*sin(y); Regards, Georgios Kokovidis
a:=Matrix([[1,2,3],[4,5,6]]); b:=Matrix([[1,2,3],[4,5,6]]); evalb(A<>b); This evaluates a Boolean and returns false. type(A <> B); This evaluates to true. Matrix is one of Maples "type" names. ?type for more info. Hope this helps. Regards, Georgios Kokovidis Dräger Medical
You can copy and paste the code and data below. Comment out the "data:=" command on the second line unless you plan on using your own data file. It is a 2 column array that is formatted for Maple manipulation. In general, this is not a good method because it is prone to amplifying noise with each iteration of the derivative order. If the position data is noisy, the velocity will be noisier and the acceleration even worse. > restart:with(plots):with(linalg): > data := readdata("C:/temp/altitude.dat",2); data := [[0., 26.515], [0.753, 53.030], [1.505, 212.121], [2.258, 437.500], [3.011, 875.000], [3.763, 1405.303], [4.516, 1922.349], [5.269, 2386.364], [6.022, 2823.864], [6.774, 3208.333], [7.527, 3579.545], [8.280, 3910.985], [9.032, 4202.652], [9.785, 4481.061], [10.538, 4706.439], [11.290, 4918.561], [12.043, 5104.167], [12.796, 5263.257], [13.548, 5409.091], [14.301, 5541.667], [15.054, 5607.955], [15.806, 5687.500], [16.559, 5727.272], [17.312, 5793.554], [18.065, 5793.561], [18.817, 5793.561], [19.570, 5780.303], [20.323, 5727.272], [21.075, 5714.015], [21.828, 5674.243], [22.581, 5621.212], [23.333, 5594.697], [24.086, 5568.182], [24.839, 5528.409], [25.591, 5475.379], [26.344, 5422.348], [27.097, 5395.833], [27.849, 5369.318], [28.602, 5329.545], [29.355, 5289.772], [30.108, 5236.743], [30.860, 5210.228], [31.613, 5157.197], [32.366, 5117.424], [33.118, 5090.909], [33.871, 5051.137], [34.624, 5011.363], [35.376, 4984.848], [36.129, 4918.561], [36.882, 4892.045], [37.634, 4852.272], [38.387, 4825.757], [39.140, 4785.985], [39.892, 4746.212], [40.645, 4706.439], [41.398, 4679.924], [42.151, 4613.637], [42.903, 4587.121], [43.656, 4547.348], [44.409, 4507.576], [45.161, 4481.061], [45.914, 4441.288], [46.667, 4414.772], [47.419, 4348.485], [48.172, 4295.455], [48.925, 4268.939], [49.677, 4242.424], [50.430, 4189.394], [51.183, 4162.879], [51.935, 4123.106], [52.688, 4083.333], [53.441, 4056.818], [54.194, 3990.530], [54.946, 3990.530], [55.699, 3924.242], [56.452, 3871.212], [57.204, 3857.955], [57.957, 3818.182], [58.710, 3778.409], [59.462, 3738.636], [60.215, 3698.864], [60.968, 3659.091], [61.720, 3619.318], [62.473, 3606.061], [63.226, 3553.030], [63.978, 3526.515], [64.731, 3460.227], [65.484, 3420.455], [66.237, 3380.682], [66.989, 3367.424], [67.742, 3314.394], [68.495, 3261.364], [69.247, 3234.849], [70.000, 3195.076], [70.753, 3181.818], [71.505, 3128.788], [72.258, 3102.273], [73.011, 3062.500], [73.763, 3022.727], [74.516, 2969.697], [75.269, 2943.182], [76.022, 2890.151], [76.774, 2850.379], [77.527, 2823.864], [78.280, 2784.091], [79.032, 2744.318], [79.785, 2704.545], [80.538, 2678.030], [81.290, 2638.258], [82.043, 2611.742], [82.796, 2571.970], [83.548, 2532.197], [84.301, 2492.424], [85.054, 2452.651], [85.806, 2426.136], [86.559, 2373.106], [87.312, 2346.591], [88.065, 2320.076], [88.817, 2267.045], [89.570, 2227.273], [90.323, 2187.500], [91.075, 2160.985], [91.828, 2121.212], [92.581, 2081.439], [93.333, 2041.667], [94.086, 1988.636], [94.839, 1975.379], [95.591, 1922.349], [96.344, 1895.833], [97.097, 1856.061], [97.849, 1803.030], [98.602, 1776.515], [99.355, 1723.485], [100.108, 1696.970], [100.860, 1670.454], [101.613, 1617.424], [102.366, 1564.394], [103.118, 1537.879], [103.871, 1511.364], [104.624, 1458.333], [105.376, 1445.076], [106.129, 1392.046], [106.882, 1365.530], [107.634, 1325.758], [108.387, 1285.985], [109.140, 1259.470], [109.892, 1206.439], [110.645, 1166.667], [111.398, 1140.151], [112.151, 1100.379], [112.903, 1047.349], [113.656, 1020.833], [114.409, 967.803], [115.161, 941.288], [115.914, 888.258], [116.667, 875.000], [117.419, 808.712], [118.172, 755.682], [118.925, 755.682], [119.677, 702.652], [120.430, 676.136], [121.183, 636.364], [121.935, 609.848], [122.688, 570.076], [123.441, 543.561], [124.194, 517.045], [124.946, 490.530], [125.699, 437.500], [126.452, 424.242], [127.204, 384.470], [127.957, 344.697], [128.710, 318.182], [129.462, 291.667], [130.215, 278.409], [130.968, 225.379], [131.720, 198.864], [132.473, 172.348], [133.226, 132.576], [133.978, 92.803], [134.731, 66.288], [135.484, 66.288]] > nops(data); > x1:=col(data,1): > x2:=col(data,2): > pair:=(x1,y1)->[x1,y1]: > position:=zip(pair,x1,x2): > pointplot(position, connect = true,title="Position vs. time for rocket data"); > velocity:=array(1..181): > velocity[1] := [position[1][1], (position[2][2] - position[1][2])/(position[2][1] - position[1][1])]: for i from 2 to 180 do velocity[i] := [position[i][1], (position[i+1][2] - position[i-1][2])/(position[i+1][1] - position[i-1][1])]: end do: velocity[181] := [position[181][1], (position[181][2] - position[180][2])/(position[181][1] - position[180][1])]: > pointplot(velocity, connect = true,title="Velocity vs. time for rocket data"); > acceleration:=array(1..181): > acceleration[1] := [velocity[1][1], (velocity[2][2] - velocity[1][2])/(velocity[2][1] - velocity[1][1])]: for i from 2 to 180 do acceleration[i] := [velocity[i][1], (velocity[i+1][2] - velocity[i-1][2])/(velocity[i+1][1] - velocity[i-1][1])]: end do: acceleration[181] := [velocity[181][1], (velocity[181][2] - velocity[180][2])/(velocity[181][1] - velocity[180][1])]: > pointplot(acceleration, connect = true,title="Acceleration vs. time for rocket data");
Try this as an example: > restart:with(stats):with(statplots):with(plots): > Data := [[1, 1], [2, 4], [3, 9], [4, 16], [5, 25], [6, 36], [7, 49], [8, 64], [9, 81], [10, 100]]; > X:=[seq(Data[i,1],i=1..nops(Data))]; > Y:=[seq(Data[i,2],i=1..nops(Data))]; > da_fit:=fit[leastsquare[[x,y],y=a*x^2+b*x+c]]([X,Y]); > ptplt:=scatterplot(X,Y,symbolsize=20,color=green): > crvplt:=plot(rhs(da_fit),x=0..10): > display({crvplt,ptplt}); > int(x^2,x=0..10); Regards, Georgios Kokovidis Dräger Medical
Something like this: > f:=x->sin(x); > [seq([step,((D@@step) (f) (x)),(D@@step)(f)(0)/step!],step=0..5)]; Georgios Kokovidis
Yes. At the maple prompt, type ?taylor for the help page with examples. Below is an excerpt: > taylor(exp(x),x=0,5); The taylor series is expanded about x=0 with the first 5 terms displayed. The last term displayed gives an indication of the degree to which the polynomial is not exact. Regards, Georgios Kokovidis Dräger Medical
Using your above data, the following lines added before and after your statement might give you what you are looking for. > restart: with(plots): >A:=matrix([[1.00, 1.00, 167.76], [1.00, 2.00, 95.588], [2.00, 1.00, 500.64], [2.00, 2.00, 335.51]]); > listplot3d(A); Regards, Georgios Kokovidis Dräger Medical
First 72 73 74 75 Page 74 of 75