A
A
Arti-Jack2018-05-01 16:11:26
Mathematics
Arti-Jack, 2018-05-01 16:11:26

How to choose an analytical expression from a graph?

Good afternoon.
I have the following task: "There is an electrical circuit. There is an input signal in the form of a graph, it is necessary to make an output signal." This is in short.
I have a graph:
5ae865cf1b3ca213844583.png
With examples of input data in the form:

tначальная = -10 секунд
tконечное = 10 секунд
U = -50 В

And I need to write this graph as an analytical expression similar to (example!):
5ae866c5665a5488644343.png
And to be precise, I also need to write a function that initializes the float array according to a given graph (in the form of an analytical expression).

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
Griboks, 2018-05-01
@Griboks

Honestly, this is a 5th grade school problem.
Can't you formulate a straight line?
y=kx+b
You have two points, for example (tstart;0) and (0;U). We compose a system of equations, solve, we get the equation of a straight line.
More advanced sawtooth*rectangular functions can be used.
Initializing an array is even easier. You need to loop through x from -infinity to infinity (or other boundaries), substituting each x into your function and storing the resulting value, for example, in a list.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question