## Customized discrete random variables...

Hi everyone,

I seek for creating a discrete random variable with the following characteristics. Let i be an integer between 1 and 100. The random variable is an integer, among i-x, i-x+1, i-x+2..., i-1, i+1, i+2... i+x. For example, with i=20 and x=5, the random variable is an integer between 15 and 25; with i=23 (and again x=5), the random variable is an integer between 18 and 28; and with i=98, the random variable is an integer among 93, 94... 97 and then 99, 100, 1, 2, 3.

Each possible value has the same probability, that is, 1/2x.

Any tips? Thank you in advance.

## Numeric Integration over Discrete Data...

Dear All

I have an numerical integral to solve over set of 10 discrete values. The problem is, this integral have two dependent variables. Please see following:

Numerical_Integration.mw

How to Solve following integral numerically over discrete data values?

 >
 (1)

where we have data values are given as under

x=1, 2, 3, 4, 5, 6, 7, 8, 9, 10

= 0.045, 0.0459, 0.0564, 0.05689, 0.06015, 0.06235, 0.0654, 0.0687, 0.07012, 0.07251

= 1.15, 1.256, 1.56, 1.85, 1.86, 2.01, 2.35, 2.56, 2.86, 2.901

Regards

## Multiple plot with DiscretePlot?...

with(DynamicSystems)

T:= a vector

Iwant to make a single plot of:

DiscretePlot(T,x1,stile=stair); DisdretPlot(T,x2,stile=stair)

The usal way: DiscreePlot(T,[x1,x2]... ain't work

Thansk for helping

## dsolve with some difficult ode...

I got a problem with a difficult ode,the commands are below.

restart;
sys := 1.*(diff(x(t), t, t)) = piecewise(b(t) = 1, 0, 1003.0-1000.*x(t)-30.*(diff(x(t), t))-25.*signum(diff(x(t), t)-.1)-.3*signum(diff(x(t), t))*exp(-2*abs(diff(x(t), t)))), x(0) = 1, (D(x))(0) = 0;
mu := 100;
stick := [diff(x(t), t) = .1, b(t) = piecewise((1000.-1000.*x(t))^2 < 10000, 1, 0)];
slip := [[0, 10000 < (1000.-1000.*x(t))^2], b(t) = 0];
sol:=dsolve({sys,b(0)=0},numeric,discrete_variables=[b(t)::float],events=[stick,slip],event_maxiter=1000000,output=listprocedure,maxfun=0,range=0..8);

## Using DynamicSystems:-Simulate to simulate an Alge...

Hi Everybody,

I'm having some problems simulating an algebraic system in Maple.  I want to do this for a larger system of equation (~20 equations/20 variables, with 3 inputs), but I'd like to get an idea of the form this should be in.

So, using an example out of Maple help:

with(DynamicSystems);

sys1:=AlgEquation([y=sin(x)],[x],[y],discrete=true,sampletime=0.001);

inp1:=Vector[column]([1,2,3,4,5,6,7]) * 0.1;

res:=Simulate(sys1,[inp1]);

Error, (in DynamicSystems:-Simulate) should never be here

I don't understand what this error means.  Reading the example in the help files, says the second argument should be a vector of input values.  What I would assume this would do is plugin x = 0.1, then solve y=sin(0.1), and output y.

Am I missing some syntax, or is my inputs wrong?  There are examples of how to set up an algebraic system in the help files, but no examples of how to simulate them.

Thanks in advance for any help!

## Discrete Fourier Transform...

Hello, I am trying to do a fourier transfrom using the package < DiscreteTransfroms >.

The function is an gaussian function for now,

Here is the code I tried

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

restart

with(DiscreteTransform):

> X := Vector(1000, proc (k) options operator, arrow; (1/200)*k-5/2 end proc);
> Y := Vector(1000, proc (k) options operator, arrow; evalf(exp(-10*((1/100)*k-5)^2)) end proc);

> X2, Y2 := FourierTransform(X, Y);
Vector[column](%id = 18446744080244879358),

Vector[column](%id = 18446744080244879478)
> plot(X2, Re(Y2));

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

The program returns two vector, X2 and Y2 who are supposed to be the fourier transforme of a gaussian so.. a gausian but when I plot the result X2 on the horizontal and Y2 on vertical, the graph doesn't resemble a gaussian function or any function at all.

Alex

## Transfer Fuction from Experimental Data (System Id...

Let's say we have the response of a discrete system  to a unit step, the measured data is available as a vector in Maple. As example: seq(evalf[2](exp(-n/5)*sin(n)),n=0..20);

How can I find the coefficients of the transfer function G(z)=(a1*z+a2)/(b1*z^2+b2*z+b3)?

Here is a paper that describes on page 27ff how to do this with regression.

Maybe there is a better way.

## How do I create histogram for a discrete probabili...

Hi,

I am relatively new to Maple and I am seeking an efficient way to create a probability histogram for a discrete probability distribution. For example,

x:      1     3   5    7

p(x): 1/8 1/4 1/2 1/8

I would like rectangles with height corresponding to the probabilities with bases centered at each x value, allowing for the possibility of gaps in the distribtuion.

## Deconstruct a waveform into its fundamental freque...

I have a sample waveform of an air conditioner and want to see if any low frequencies (10 Hz which is harmful to human health) exist in the wave.  How can I do that?

Granted the frequencies picked up in the recorded file depend on the quality of the recording and the recorder and lower frequencies may not have been picked up.

I've looked at

 Page 1 of 1
﻿