MaplePrimes Questions

Hello
Is it possible to reproduce this MathCad example in Maple?

The quantity diff(y)./diff(x) is an approximate derivative.

  • x = [1 2 3 4 5];
    y = diff(x)
    y =
         1     1     1     1
    
    z = diff(x,2)
    z =
         0     0     0
    

Given,

  • A = rand(1,3,2,4);
    

diff(A) is the first-order difference along dimension 2.

diff(A,3,4) is the third-order difference along dimension 4.


The function diff of Matlab calculates differences between adjacent elements of X along the first array dimension whose size does not equal 1

Is there a similar function in Mape?

 

Please, where are the statistical tolerance intervals in Maple, similar to those we have in MiniTab and in R ?  maybe in statistical quality control ?

Example 1 :  Package « tolerance » in R (https://cran.r-project.org/web/packages/tolerance/tolerance.pdf) : 

 

« Description :  Statistical tolerance limits provide the limits between which we can expect to find a specified proportion of a sampled population with a given level of confidence. This package provides functions for estimating tolerance limits (intervals) for various univariate distributions (binomial, Cauchy, discrete Pareto, exponential, two-parameter exponential, extreme value, hypergeometric, Laplace, logistic, negative binomial, negative hypergeometric, normal, Pareto, Poisson-Lindley, Poisson, uniform, and Zipf-Mandelbrot), Bayesian normal tolerance limits, multivariate normal tolerance regions, nonparametric tolerance intervals, tolerance bands for regression settings (linear regression, nonlinear regression, nonparametric regression, and multivariate regression), and analysis of variance tolerance intervals. Visualizations are also available for most of these settings. »

 

Example 2 : 

https://support.minitab.com/en-us/minitab/18/help-and-how-to/quality-and-process-improvement/quality-tools/how-to/tolerance-intervals-normal-distribution/methods-and-formulas/methods-and-formulas/

https://support.minitab.com/fr-fr/minitab/18/help-and-how-to/quality-and-process-improvement/quality-tools/how-to/tolerance-intervals-nonnormal-distribution/methods-and-formulas/tolerance-intervals/   

The Maple Math button is not working for me in the MaplePrimes editor.  No matter what I enter as Maple Expression, I get You have entered an invalid Maple expression, no preview, and nothing is inserted.  The same goes for the Maple Plot button. 

I'm using Firefox 58.0.1 under Windows 10 (64 bit), but this also occurs with Internet Explorer.

   

Hi, i want to investigate  chaos for the problem , cantilever beam under random narro band excitation, but the code has errors .the code is this:

      restart:with(plots):      h:=1: Omega:=(0..376):alpha1:=617.2:alpha2:=1.02*10^(8): c:=.002:k:=18.4:  step:=0.1:imax:=376:  for i from 0 to imax do;  Omega[i]:=i*step:   f:=evalf(solve({((-a*Omega[i]^(2)+alpha1*a+3/(4)*alpha2*a^(3)+1/(4)*k*Omega[i]^(2)*a^(3)-(3)/(4)*k*Omega[i]^(2)*a^(3))^(2)+(c*Omega[i]*a^())^(2))=h^(2),a>0}));  ff[i]:=((rhs(f[1]))^(2))/(2):  end do:   l1:=[[Omega[n],ff[n]] $n=0..imax]:  p1:=plot(l1, x=0..3,y=0..1,  style=point,symbol=solidcircle,symbolsize=4,color=red):    jmax:=914: f1:=array(377..914):f2:=array(377..914):f3:=array(377..914):Omega1:=array(377..914):  for j from 377to jmax do;  Omega1[j]:=j*step:   fff:=evalf(solve({((-a*Omega1[j]^(2)+alpha1*a+3/(4)*alpha2*a^(3)+1/(4)*k*Omega1[j]^(2)*a^(3)-(3)/(4)*k*Omega1[j]^(2)*a^(3))^(2)+(c*Omega1[j]*a^())^(2))=h^(2),a>0}));  f1[j]:=((rhs(fff[1,1]))^(2))/(2):f2[j]:=((rhs(fff[2,1]))^(2))/(2):f3[j]:=((rhs(fff[3,1]))^(2))/(2):  end do:   ll1:=[[Omega1[n],f1[n]] $n=377..jmax]:  pp1:=plot(ll1, x=0..10,y=0..1,  style=point,symbol=solidcircle,symbolsize=4,color=red):    ll2:=[[Omega1[n],f2[n]] $n=377..jmax]:  pp2:=plot(ll2, x=0..10,y=0..1,  style=point,symbol=solidcircle,symbolsize=4,color=red):    ll3:=[[Omega1[n],f3[n]] $n=377..jmax]:  pp3:=plot(ll3, x=0..15,y=0..1,  style=point,symbol=solidcircle,symbolsize=4,color=red):       plot({  seq(seq(p1), seq(seq(pp1),seq(seq(pp2),seq(seq(pp3))  },style=point,title=`Pitchfork Diagram`);  Thanks for your help

I need to convert this Maple Table to a Matrix

table([(25, 1) = -39, (16, 151) = 32, (33, 1) = -54, (1, 1) = 29, (13, 1) = 32, (31, 101) = -7, (6, 51) = -10, (11, 101) = -1, (28, 151) = -39, (18, 51) = -65, (4, 151) = 29, (8, 151) = -10, (23, 101) = 23, (34, 51) = -54, (40, 151) = 87, (36, 151) = -54, (9, 1) = -1, (37, 1) = 87, (21, 1) = 23, (14, 51) = 32, (22, 51) = 23, (20, 151) = -65, (27, 101) = -39, (3, 101) = 29, (19, 101) = -65, (24, 151) = 23, (32, 151) = -7, (30, 51) = -7, (38, 51) = 87, (7, 101) = -10, (10, 51) = -1, (29, 1) = -7, (35, 101) = -54, (17, 1) = -65, (26, 51) = -39, (15, 101) = 32, (12, 151) = -1, (39, 101) = 87, (5, 1) = -10, (2, 51) = 29]) 

Hello,

I have difficulties to solve a small linear system.

I attach my code. It may be due to derivate variables but i'm not sure. I remember having solve before similar systems.

Analyse_cinematique_test2.mw

May you have a look at my code and tell me why the solve function doesn't return any results ?

Thank you for your help.

Hello,

I have a set of 8 kinematic constraints.

I would like to express them into the following form Jxdq with J the jacobian matrix.

I attached my code.

the 8 equations are gathered in SysEq

Thanks a lot for your help

Analyse_cinematique_test.mw

The following quiz doesn't react in the rigth way, when the respond is a fraction with nominator 1. When the fraction 4/20 is the answer, the respond 1/5 is incorrect

Grading:-Quiz("Reduce this fraction",
proc (Resp, Ans) evalb([op(InertForm:-Value(Ans))] = [op(Resp)]) end proc,
proc () local a, b, c; a := rand(1 .. 5); b := rand(1 .. 5); c := rand(2 .. 5)( ); `%/`(a( )*c, b( )*c) end proc, 
'inertform' = true)

Any proposals?

For example, if we have

 

 

How can get the 0.312 part of a? I have tried evalf and op without success.

Below is my code (I hope copy paste is ok.....)

restart;

OB := add(px[i]*(px[i]-py[i])*(1-Sw[i])*fclass[i], i = 1 .. 6); # this is my objective function

px := Vector[row](6, [0.6e-2, 0.5e-2, 0.4e-3, 0.3e-2, 0.2e-3, 0.1e-3]);

py := Vector[row](6, [0.9e-2, 0.8e-2, 0.7e-2, 0.6e-2, 0.5e-3, 0.4e-3]);

fclass := Vector[row](6, [0.1e-4, 0.9e-4, 0.9e-3, 0.9e-2, 0.9e-1, .9]);  # assign some numbers for the parameters

with(Optimization);

Maximize(OB, {add(Sw[i]*fclass[i], i = 1 .. 6) = 0.001, Sw[1] <= 1, Sw[2] <= 1, Sw[3] <= 1, Sw[4] <= 1, Sw[5] <= 1, Sw[6] <= 1}, assume = nonnegative);

  [-1.08216000000000 *10^-7 , [Sw[1] = 1., Sw[2] = 0., Sw[3] = 0., ] Sw[4] = 0.110000000000000, Sw[5] = 0., Sw[6] = 0.]

The Optimization result is -1.08216*10^-7. However, this is clearly not right, since with the below solution for Sw[i], the result is bigger and the constaint still hold...(i.e. add(Sw[i]*fclass[i], i = 1 .. 6) = 0.001)

[-1.07676000000000*10^(-7), [Sw[1] = 1., Sw[2] = 1., Sw[3] = 0., Sw[4] = .1, Sw[5] = 0., Sw[6] = 0.]]

I cannot see what's wrong...Can we simply blame the floating point is not easy for Maple to handle??

Thanks.

Hello guys,

I have some problems with plugging in a metric ansatz to some tensorial terms.
ansatz1.mw

Best

How can reduce the number of circle in this curve

f := proc (x) options operator, arrow; sin(x) end proc;

plot(f(x), x = 0 .. 2*Pi);

 

Dear all,
When I try to simplify the expresion z+conjugate(z) I get, as expected, 2*Re(z).

The problem arises when I try to do the same with a more complicated expression as z1*conjugate(z2)+conjugate(z1)*z2. Trying to simplify this Maple only give me back the expression with nochange. The expresion is equivalent to the first example so I expected to get 2Re(z1*conjugate(z2)).

Does anybody know how to solve this problem?
Thank you in advance!

Hello,

I have two functions :
x(apha1,alpha2)
y(alpha1,alpha2)

When alpha2 is fixed, i can make a parametric plot to see the evolution of the point M which have the coordinates (x,y).

Consequently, 

for alpha2 = 30°, i can plot 

plot([eval(X(alpha1,30*Pi/180)),eval(Y(alpha1,30*Pi/180)),alpha1=-30*Pi/180..30*Pi/180],-1..1,-1..1);

for alpha2 = 25°, i can plot 

plot([eval(X(alpha1,25*Pi/180)),eval(Y(alpha1,25*Pi/180)),alpha1=-30*Pi/180..30*Pi/180],-1..1,-1..1);

for alpha2 = 20°, i can plot 

plot([eval(X(alpha1,20*Pi/180)),eval(Y(alpha1,20*Pi/180)),alpha1=-30*Pi/180..30*Pi/180],-1..1,-1..1);

and so on ...

I would like to plot these different parametric plots with a increment of 5 degrees for alpha2 from 30° to -30°. But, i would like to gather all the plots on the same plot.

I attach my code. My attempt with a for loop doesn't work.

How can i do such a plot (gathering several parametric plots) ?

Thank you for your help.

Analyse_cinematique_vehicule_4D_28.01_test.mw

 

 

 

First 872 873 874 875 876 877 878 Last Page 874 of 2427