0
votes
0answers
37 views

A problem with functions and Infinite expression 1/0 encountering

Following code (function) makes integrals and then replace f[x] with Cos functions and calculate the definite parametric ...
0
votes
1answer
75 views

A problem with set values

The following code is just an example to clearly explain my problem. Assume that : ...
1
vote
3answers
165 views

How to update a list in a function in each iteration

There is a list with numbers 1 to 8 ( p1 ) and another list (j) which contains 4 numbers which shows different 4 positions of ...
0
votes
1answer
44 views

How to put some values from a list into a function in a Do loop

I want to program a code in MATHEMATICA in order to calculate some values in different iteration. For example, assume this list: list={1,2,3,4,5} Now assume that ...
6
votes
1answer
188 views

Why won't my function plot?

If I define ...
1
vote
2answers
145 views

Plot a function which depends on itself

How can I plot a stepwise function like f[a, t] = 10 Exp[-0.1 Sin[t]] for a > t and ...
0
votes
0answers
88 views

Intersection of any triangle with a circle in Cartesian coordinates

I started a notebook dealing with metrics in a triangle and its intersection points by a circle. Up to know I reached the point of having plotted a triangle, a circle with an arbitrary centre and I ...
0
votes
1answer
80 views

Working with functions

I am required to write a function that takes a function as a parameter. ...
0
votes
0answers
21 views

Question about a ParametricPlot with a shading grey family of lines and/or different sizes [duplicate]

So, I have this function of the polar angle $\theta$, with a varying parameter $t$: {Cos[\[Theta]] (1 + Sin[t]), Sin[\[Theta]]} and I want to draw it in a ...
1
vote
2answers
145 views

Multiple curves plotted with different colours [duplicate]

I am trying to use ColorFunction for 2 functions on the same plot. I only want the cubic equation to change colour. ...
1
vote
1answer
197 views

Detecting a nonlinear edge in a 2D point pattern

Following an earlier post here, I have generated a point pattern on the unit square $[0,1]\otimes[0,1]$, which is described by a piecewise constant intensity function constructed so that (in ...
0
votes
2answers
140 views

How to find intervals in the domain corresponding to intervals in the range?

I want to find the intervals for the argument m1 of this function corresponding to the value for the function lying in given intervals of the range: ...
2
votes
2answers
115 views

how to get a linearized curve in some intervals

in below picture I draw a graph base on weight of a controller system against cost function. I want to linearise and divide this curve to for example 5 five intervals. is there any function in ...
2
votes
2answers
213 views

How to plot several functions without jumping? (multiple eigenvalues of a system as functions of 2 parameters)

I've been working on this research problem for months with some success by no global/proper solution to the problem. So I have square, Hermitian matrices of various sizes ($8,20,38$ dimensions) with ...
0
votes
1answer
119 views

How to plot a function with variable with an open interval? [closed]

I want to plot this revenue function: $r=30q-0.3q^2$ I have no range, its an open interval, but when I try to plot in Mathematica it requires the min and max of the plotting limits. How do I do ...
6
votes
2answers
165 views

how recover lost data of coordinates from contourplot of mention data?

I have made Contour Plot for a lot of data, like this ...
0
votes
0answers
65 views

Custom Errorbar-Function

I wanted to have a better control on the ErrorListPlot, so I defined a custom ErrorBarFunction: ...
2
votes
3answers
201 views

How would I plot the volume element in cylindrical coordinates?

I have this graph: But it doesn't have a function so I can't just plugin in a function into wolfram or mathematica to plot it. I have these coordinates to make it however: ...
2
votes
1answer
76 views

What is the need for function parameters? Many possible inputs

If I have many possible variables related to one another, why do I need to define my function with parameters for plotting? For example, if I have an equation like: ...
1
vote
1answer
82 views

Issues with creating functions [duplicate]

Sometimes when I try to create a function inside a function, Mathematica gives me a hard time. I usually just have to play around with the syntax until it gets something it "likes" but I really have ...
0
votes
1answer
94 views

Nested function problem [closed]

I have trouble defining the following function in Mathematica sp[M_, u_] := 1/Sum[u^k M!/(M - k)!, {k, 0, M}] After defining it Mathematica displays an error. ...
23
votes
4answers
265 views

How can the behavior of InterpolationOrder->0 be controlled?

In ListPlot and Interpolation, the option InterpolationOrder->0 uses two different ...
3
votes
1answer
111 views

plotting hypergeometric functions

Does anyone know why a plot of a hypergeometric function turns out differently in Mathematica than in Maple? The function I'm plotting between x=-30 and +30 is: ...
-1
votes
1answer
937 views

Why won't my function show in my plot? [closed]

I defined a function f as f[x_] := x^3/(x^2 + 1); and a function F as ...
-1
votes
2answers
175 views

How do I generate a table of data points from a function and add random noise? [duplicate]

I am trying to generate a table of data for the function: ...
2
votes
2answers
146 views

Restarting an Animate[] animation after variable in Manipulate[] changes

I've been trying to restart an animation after variables change from Manipulate PopUpMenus. My animation takes the form: ...
1
vote
1answer
579 views
0
votes
1answer
608 views

How do I define the domain of a function?

I have a function of two variables, f[x_, y_], and I would like to restrict the domain to values of x and ...
1
vote
1answer
560 views

3D plot of two 2D functions

I would like to plot two 2d functions in a 3d coordinate system. Examples are z = x^2 and z = y^2. Each function has one ...
0
votes
0answers
27 views

How does Plot evaluate its argument? [duplicate]

I have a list of about twenty InterpolatingFunctions that I'd like to plot. They are interpolations from experimental data (frequency spectra between 100 and 5000 ...
1
vote
1answer
557 views

Plotting a complex function [duplicate]

What does it mean if this message appears: {Im[(1-E^Times[<<3>>] f)/(1-Power[<<2>>] f)]-0,Im[(1-E^Times[<<3>>] f)/(1-Power[<<2>>] f)]-0} must be a list of equalities or ...
3
votes
2answers
736 views

Define a color function using Piecewise

How can I define a ColorFunction for my ContourPlot using Piecewise? For example after ...
7
votes
6answers
499 views

Manipulate and Turning Expressions into Functions

I've been trying to use Manipulate to do interactive plotting, but I've been running into a few problems with saved expressions. I have an expression saved as "func" and I want to work with it and ...
2
votes
1answer
613 views

Calculating volume [closed]

I'm new in mathematica and I'm stucked on how I can get the volume of a solid created by the inequation: ...
3
votes
1answer
231 views

Plot maximum and minimum temperature of a day for range of time interval

How to display (in any graphic representation) the maximum and minimum temperatures for one city in one of these selected time periods over the 5-day period? The time periods are: Morning (06:00 to ...
5
votes
4answers
402 views

Prevent Part[] from trying to extract parts of symbolic expressions

If you have a list, e.g. {1, 2, 3} then you can extract the $k$th part using Part (...
3
votes
2answers
2k views

Plot Even Piecewise function

Is it possible in Mathematica to plot an even piecewise function like: $ f(x) = \begin{cases} 3t , 0 \le t \le \frac{\pi}{2} \\ 3t + 6 , \frac{\pi}{2} \le t \le \pi \end{cases}$ which has ...
7
votes
1answer
374 views

Demonstrating Ackermann's Function

The Ackermann function is an extremely fast growing function. There are some slightly different versions of the function, but the one that I am looking for can be defined as: $$ A_0(x)=x+1 \\ ...
3
votes
2answers
263 views

Plotting two functions with dependent input function

I have defined a function: myJ2[n_] := 1/n* Total[RandomVariate[NormalDistribution[0, 1], n]^2] This is basically an approximation to the gaussian integral. I ...
9
votes
1answer
1k views

Using RegionFunction on multiple plots

I realize that the Plot function can plot multiple functions of x at the same time, using { }. I also know that the ...
6
votes
3answers
763 views

How do I plot Thomae's function in Mathematica?

I wanted to plot this function $$f(x) =\begin{cases} 1 & \text{if } x= 0 \\ \tfrac1{q} & \text{if } x = \tfrac{p}{q}\\ 0 & \text{if } x \in \mathbb{R}-\mathbb{Q} ...
6
votes
4answers
2k views

Plotting a simple relationship with Plot[] results in empty graph

I've moved this question over from StackExchange to get better visibility (and deleted the old question). I have a user-defined relationship I'd like to plot: ...
2
votes
4answers
4k views

Calling Correct Function for Plotting DiracDelta

I am wondering what is the correct function in Mathematica to plot the true impulse function, better known as the DiracDelta[] function. When using this inside of a ...
7
votes
2answers
1k views

Series of piecewise functions

Let $f_{0}(x):[0,1]\to[0,1]$ be defined by $$f_{0}(x):=\begin{cases} 3x, & \text{if } x\in [0,\frac{1}{3}] \\ \\ -3x+2, & \text{if } x\in (\frac{1}{3}, \frac{2}{3}] \\ \\ 3x+2, & ...
16
votes
3answers
2k views

Plotting piecewise function with distinct colors in each section

I have a piecewise function that I would like to plot but I was wondering if it is possible that each part of the function that is plotted when its corresponding condition is true be plotted with a ...