MaplePrimes Questions

Hi 

How to add a legend to Statistics:-Histogram?

This could be particularly useful to compare histograms, for instance in

S := Statistics:-Sample(Normal(0, 1), 1000):
T := Statistics:-Sample(Normal(1, 1), 1000):

plots:-display(
  Statistics:-Histogram(S, color=gold, transparency=0.3, legend="N(0,1)"),
  Statistics:-Histogram(T, transparency=0.3, legend="N(1,1)")
);

But doing this generates the error Error, (in Statistics:-Histogram) display does not accept the legend option

And yes indeed, even this command

h := Statistics:-Histogram(S, legend="N(0,1)")

already produces the same error.

After having examined the structure of h and using a way Carl Love gave here How to change the colour inn Statistics:-Sunflower?  I finally obtained the expected plot.
 

HS := Statistics:-Histogram(S, color=gold, transparency=0.3):
HT := Statistics:-Histogram(T, transparency=0.3):

hs := evalindets([op(HS)], specfunc(COLOUR), c-> (c, LEGEND("N(0,1)")) ):
ht := evalindets([op(HT)], specfunc(COLOUR), c-> (c, LEGEND("N(1,1)")) ):

PLOT(op(hs), op(ht))



But this rather long a way to proceed (Note: it seems that the overrideoption  that acer suggested in this prevous thread doesn't "work" here?)
Do you have any idea if there is a simpler solution?

TIA

AoA....

sir how we solve partial differential equation by Adomian Decomposition method in maple? plz send me maple code..

Dear all
I have a problem when running the follwoing code using the input proposed. 

 

integ_R.mw

problem : print_table , used as input in  proc 

Thank you for your help 

Dear all

I tried to compute an integral using trapezoidal rule using two differents methods but I get two different results
trap.mw

Thank you for your help 

How to solve and plot the integral equation?
b.mw
 

I am trying to input X-data, Y-data from spreadsheet-section of Numbers (Apple App) to do reression analysis in Maple. I do not understand the export or import tools very well just yet, asis obvious from numerous wrong results.

Since I want to do regression of the X-Y data trends, what format would you recommend using for the data once imported into Maple; two sequences, two-vectors, multi-row column matrix ???

If someone has worked with Numbers-Apple-App (Not Excel) into Maple to do this and can provide simple example with steps/tools used. It would be appreciated. Thanks

Dear all

I would like to sketch the solution of first ode, but by hand we can not get the solution. I used maple, to  solve the ode but unfortunattely there is no solution obtained so I can sketech the behavior of the solution. 

Is there any way to sketch the solution behavior .

sketch_solution.mw

 

thank you 

Hi. I have solved numerical an ODE and want to use the solution in the integrand of a subsequent integral. I'm being frustrated by my lack of knowledge and the internet isn't helping! I hope someone can put me right.....here's the relevant part of code.


dsysA := {diff(r(s), s) = sqrt((g*r(s) + h)^2 - 1 + 1/r(s)), r(0) = rinit};
dsnA := dsolve(dsysA, numeric, abserr = 10^(-6));

dsnA(0.1);
               [s = 0.1, r(s) = 1.51303353884965]

rA := s -> rhs(dsnA(s)[2]):

rA(0.2);
                        1.53235325247661

tA := s -> tinit + int((g*rA(p) + h)/(1 - 1/rA(p)), p = 0 .. s):


tA(0.01);
Error, (in rA) invalid input: rhs received dsnA(p)[2], which is not valid for its 1st argument, expr
 

Hi, I want to minimize a*x + log2(3+4.2^(-x)+2^(-2x)) , x>0 & 0<=a<=1 where a is some constant. Is there any command in maple which help me to minimize this. For command minimize, I am unable to minimize the function symbolically. I need to minimize it in terms of a.

Hi I am trying to compute the series approximation for the difference between these two divergent integrals

M := int(cosh(p)^2/sqrt(cosh(p)^2 - (1 + x)^2*sinh(p)^2), p = 0 .. 1/2*ln(1/x));

N := int((1 + x)*sinh(p)^2/sqrt(cosh(p)^2 - (1 + x)^2*sinh(p)^2), p = 0 .. 1/2*ln(1/x))

 

where x,p are positive and x is approaching zero. I would like to get a series expansion of M-N, but I am not quite if this is possible.

 

Dear Users!
Hope everyone fine here. I have a vector V and want a new vector after transformation like

V := Vector(5, {(1) = 2, (2) = 3, (3) = -1, (4) = 9, (5) = 7});

after square transformation of V I got a new vector W like bellow

W := Vector(5, {(1) = 4, (2) = 9, (3) = 1, (4) = 81, (5) = 49});

and similarly sin transformation of V give the following matrix as

U := Vector(5, {(1) = sin(2), (2) = sin(3), (3) = sin(-1), (4) = sin(9), (5) = sin(7)});
Please help me to get vectors W and U.

Dear all
Using cubic spline interpolation to interpolate a given function I get  
the follwoing error
Warning, solving for expressions other than names or functions is not recommended.
Error, (in solve) list of unknowns contains repeated elements: [1, 0]

and  why the  spline funciton obtained by this code is different to the one given by Maple's built in package.

inter.mw

Thank you for any help 

I want to remove the term XY
f:=(x,y)->2*x²+xy+y²+4x-y-2=0;
eq := simplify(subs(x = X-9/7, y = Y+8/7, f(x, y)));
theta:=Pi/8;
ex := simplify(subs(X = cos(theta)*X-sin(theta)*Y, Y = sin(theta)*X+cos(theta)*Y, eq)); evalf(%);
How to obtain (3+sqrt(2))/2*X²+(3-sqrt(2))/2=36 ? Thank you.

 

Hello,

I have two ordiary differential equations to be solved numerically. One of the equations can be solved independently (no need to solve the 2nd differential equation). However, in order to solve the 2nd differential equation, I need the numerical solution from the 1st one. 

sol1:=dsolve({ode1,x(0)=x__0, D(x)(0)=x__1},numeric, x(t), parameters=[a,b,c])

sol1(parameters=[4,5,1])

Now, I need to solve the 2nd differential equation which will give me y(t), but the differential equation depends on the function of x(t). What is the syntax of dsolve which incorporates the solution of another differential equation?

 

 

Hello, 

How one would define a function of a function-- a functional?

Given

f(g(r)) := int(g(r), r)

I would like to get 

int(h(r+eps),r)

when I call it like

f(h(r+eps))

I could achieve this behaviour by substitions, but is there a nicer and shorter way of doing this?

Thanks in advance.

First 321 322 323 324 325 326 327 Last Page 323 of 2308