The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [piecewise]

Questions about the Piecewise function, which is represented by different expressions for different ranges of values of its independent variable.

309 questions
Filter by
Sorted by
Tagged with
124 views

InterpolatingFunction::dmval error in the Piecewise function with an interpolation funcion included

I have a set of data, first I deal the data with an Interpolation function. excitef1 = Interpolation[ps1] Then I use a Piecewise function to expand the range of ...
741 views

Piecewise imposes internal boundaries in NDSolve - is this expected?

In the following code I used True as the predicate for DirichletCondition and found that the boundary condition was applied not ...
794 views

Colors for multiple piecewise functions

I have the following $3$ piecewise functions, and I would like that f1, f2 and f3 have $3$ ...
92 views

Motion study using initial conditions

I think I'm making a mistake to reach my goal. I would like to find an $x[t]$ function that could describe the following conditions: 1 - The object is in position $x=151$ (meters) at time $t=5$ (...
99 views

I am attempting to add advection to my mathematica model of 2-D Diffusion. I am trying to add a sine-flow vector field, which is A*sin[x] in the y direction and <...
86 views

Why is Manipulate breaking?

I am trying to manipulate a piecewise function. The first and second piece are attached at point x where x should also be manipulated (basically each curve has it's ...
94 views

Priority of nested function in Mathematica

I am facing a small problem with the nested function in Mathematica. Please take a look at the attached Code below. ...
139 views

UnitStep vs HeavisideTheta; KroneckerDelta vs DiscreteDelta

What are the differences between these pairs of functions? In many cases, they seem to act the same. For example, both DiscreteDelta and ...
304 views

Integration over a (non-parametric) curve defined by indicator function

I want to integrate the real function myFun defined on a 2D plane over the line locus, defined as the solution of a set of ...
226 views

Different expressions for an integral if I split the region of integration

Consider the assumptions ...
669 views

Using Boole to integrate over region

I have a complex and long piecewise function to integrate, so I have written a Mathematica script that cuts the whole range of integration, evaluates the integrand in each region and then integrates ...
131 views

Does Mathematica have this function implemented?

Is there a function in Mathematica that can express a piecewise function in terms of the Heaviside theta function? Say, for example, the solution to this ODE.
261 views

NDSolve with Piecewise function

I have the following code on Mathematica ...
4k views

102 views

PiecewiseExpand fails with min of two piecewise functions

I have two Piecewise functions that are (in this case) just the empirical CDFs of two sets of data: ...
401 views

StreamPlot No Longer Works With Piecewise Function?

Bug introduced in 7.0.1 or earlier and persisting through 11.1 I was trying to plot a phase portrait (StreamPlot) using a piecewise (...