Интеграция функции для получения функции [закрыто]Python

Программы на Python
Anonymous
Интеграция функции для получения функции [закрыто]

Сообщение Anonymous »


У меня есть функция, которая принимает словарь и возвращает ускорение.

I put a list of data for a certain parameter (lets call it ) in that dictionary, and the function returned an array of 100 results(in respect to alpha).

Now I want to integrate these values one by one, to get let's say an array velocity in respect to the parameter ( so that i can plot these values in matplotlib).

Edit:

Actually i have a mechanical problem. The ladder is placed against the wall, and because its

Код: Выделить всё

friction coefficient
is too small it's starts sliding.
So i have written a function which returns the

Код: Выделить всё

acceleration
of that ladder for any

Код: Выделить всё

angle between 30° and 90°
(30 is the starting angle, and 90 is when the ladder is on the ground).

Anyways, I've calculated

Код: Выделить всё

acceleration
in respect to the angle . I have the data stored in array .
I tried

Код: Выделить всё

scipy.integrate.simps()
but that method returns the final velocity . I've also tried

Код: Выделить всё

scipy.integrate.quad()
but returns the same result.

I would like to generate an array of velocities which will contain a value for every angle, like in array of accelerations -

Источник: https://stackoverflow.com/questions/345 ... a-function

Вернуться в «Python»