1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Opgave 1"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
"import cmath\n",
"import math\n",
"import matplotlib.pyplot as plt\n",
"import numpy as np"
]
},
{
"cell_type": "code",
"execution_count": 40,
"metadata": {},
"outputs": [],
"source": [
"def f(k):\n",
" part1 = (2 + 2j * k * math.pi)\n",
" tope = (1 + k * 1j * math.pi)\n",
" part2 = np.exp(tope) - np.exp(-tope)\n",
" return part2 / part1\n"
]
},
{
"cell_type": "code",
"execution_count": 45,
"metadata": {
"scrolled": true
},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.collections.PathCollection at 0x7f78484dd610>"
]
},
"execution_count": 45,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD4CAYAAAD8Zh1EAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAAAUDElEQVR4nO3df4xcV3nG8efJehOWX13AC4rXNnYrY7CaBMPUUEFLUn6snVbYhCIlIKApkRWJUPqPi62ogSpCCbVatRUB10qtgERjVYprTAldKJBGbZTidR1iG2fDkgi864hsCKYtWRHbefvH3E3G45mdOzt3984cfz/SyHPPPTv7Hu/Os2fOvXfGESEAQO+7qOwCAADFINABIBEEOgAkgkAHgEQQ6ACQiCVlfeOlS5fGqlWryvr2ANCTDh069FREDDXaV1qgr1q1SmNjY2V9ewD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yAQA0R6ADQCIIdABIBIEOAIkg0AEgEQQ6ACSCQAeARPw/7QOJCwTPus4AAAAASUVORK5CYII=\n",
"text/plain": [
"<Figure size 432x288 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"x = np.arange(-30, 30, dtype=np.complex)\n",
"y = abs(f(x))\n",
"plt.scatter(x, y)\n"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.6"
}
},
"nbformat": 4,
"nbformat_minor": 4
}
|