Items tagged with piecewise piecewise Tagged Items Feed

Hi,

See the code mli.mws

What is the mistake in this command ?

chfonc:=cat('piecewise(' , seq(cat(convert(t<lf[k],string) , ' , 1 , ' ,convert(t<lf[k],string), ' , 1 , ' ) , k=1..p) , '1) ') :

I have two list, x1 and d, I want to make a piecewise function out of them and plot it, but I may have some other stuffs like this so I decided to write this procedure in a proc, the proc makes the input of the piecewise right, but when I want to make a function out of this and pass it to plot this does not works properly, I tried something else; first assigned a seri to a variable and passed it to the piecewise to make a function out of it this does not works either, but when...

piecewise and for-loop

March 26 2012 by gph_mix 5 Maple 15

Hi

How can I use loop-varible in a definition of piecewise function? For example, when I do:

for k to 5 do

f[k] := x -> piecewise(x > 0, k, 0);

end do;

f[3](1);

f[2](1);

 

I get:

f[3](1) = 6

f[2](1) = 6

DEplot and error

February 16 2012 by davidp 5

i tried to plot a differential equation with piecewise.

h:=piecewise(0 <= t and t <= 1, 1, 1 < t and t <= 2, 2, 2 <= t and t <= 3, 0, 3 < t and t <= 4, 2, 4 < t, 1.5):

g3:=diff(y(t),t)=((800-y(t))*y(t)/*(100+y(t)))-E*h

ivs6:=[y(0)=100,y(0)=500,y(0)=1500]:

with(DETools):

DEplot(g3,y(t),t=0..10,ivs6);

I have a system of equations:

> c := .67;
print(`output redirected...`); # input placeholder
0.67
> r := `<,>`(r1, r2, r3);
print(`output redirected...`); # input placeholder
Vector[column](%id = 190246956)
> Y := `<,>`(gamma1(t), gamma2(t), gamma3(t));
print(`output redirected...`); # input placeholder
Vector[column](%id = 190247020)
> r1 := piecewise(gamma3(t...

This is the Pde I am trying to solve, with the initial profile function at t=0 called Piinitial, and IC=initialconditions,boundary conditions,

Piinitial := piecewise(r <= 1, (1/9)*r^2+(1/12150)*(31*(8807640902+1170*sqrt(24475122685023))^(2/3)+109499254+22553*(8807640902+1170*sqrt(24475122685023))^(1/3))/(8807640902+1170*sqrt(24475122685023))^(1/3), r <= 2 and 1 < r, (4/405)*(8807640902+1170*sqrt(24475122685023))^(1/3)*r+(14128936/405)*r/(8807640902+1170*sqrt(24475122685023...

piecewise not suitable to sum:

restart;
with(codegen):
H:=proc(y,a,b) y+piecewise((y>0), a,b); end proc;
prep2trans(H);
Error, (in intrep/StatSeq) invalid terms in sum: if 0 < y then a else b end if


Any walkarounds?

relay with hysteresis in maple

November 18 2011 by nhbaars 0 Maple 13

hey all,

does somebody know how to make a relay with hysteresis? like this :http://en.wikipedia.org/wiki/Preisach_model_of_hysteresis

you somehow have to know from which side x is comming from, memory?

i've someting in a piecewise format, but de hysteresis is not working, becaus i don't know how to detect where x is comming from (from the right or the left)

 

 

 

Hi all,

 i have a problem with the equation generation in MapleSim, when using spring/damper elements in a Multibody-System. As an example, I've created a model of a mass-spring-damper system:

 

 


 

I am trying to plot the cdf of a binomial random variable, which has jump discontinuities at each of the integers with positive probability mass. Typically, when plotting a piecewise function, one would prefer not to have Maple connect all the points of discontinuity with a vertical line, and discont=true achieves that. Why doesn't the following command yield the expected results:

with(Statistics):

with(plots):

X:=RandomVariable(Binomial(25,.65)):

I have a piecewise function which I want to curve fit automatically in Maple. The conditions are:

  • The new smooth curve must have the same area.
  • The new curve mus start and end at the same location.

An image of this is shown below. How can I do this in Maple?

Image Link: http://dump.omertabeyond.com/?di=1613174606062

How do I allow an infinite amount of parameters (...rest parameters don't seem to exist in Maple) such as the ones in the piecewise procedure (except for the optional parameter)?

Hey there,

 

So I'm trying to throw into Maple for analysis the Cauchy problem:

g := piecewise((t, y) <> (0, 0), 4*t^3*y/(t^4+y^2), (t, y) = (0, 0), 0)

y(0)=0.

Is this possible? I'm investigating Uniqueness/existence on it (even though I know the solution already, given that it's Bernoulli in dt/dy with general solution: y(t)=c^2-sqrt(t^4+c^4)  , c is an element of the reals.

I've done some googling and looking around...

I have a piecewise function which I require to be transformed to a fourier series.

The function to be transformed is:

         velocity:=piecewise(t<=6, 3*sin(t*Pi/6), t>6, 0);

How can I change this to a fourier series in a simple manner.

 

Thanks for your advice.

I solved the canonical equations as piecewise functions and I wrote the Hamiltonian using these piecewise functions. Now the Hamiltonian is function of time (tau). I can not plot this Hamiltonian. Where is my mistake, please? Below is the Maple program. I mention that I tried to simplify the Hamiltonian, but without succes. Thank you for helping me.

                    ...

1 2 3 Page 1 of 3