Start af Matematik 1b
This commit is contained in:
50
01002 - Matematik 1b/Funktioner 1/Funktioner1.ipynb
Normal file
50
01002 - Matematik 1b/Funktioner 1/Funktioner1.ipynb
Normal file
@@ -0,0 +1,50 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 11,
|
||||
"id": "d2493461",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"2\n",
|
||||
"2\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"import sympy\n",
|
||||
"\n",
|
||||
"x = sympy.symbols('x')\n",
|
||||
"h = 2\n",
|
||||
"relu = sympy.Max(0, h) + sympy.Max(0, -h)\n",
|
||||
"print(sympy.Max(h,0))\n",
|
||||
"print(relu)"
|
||||
]
|
||||
}
|
||||
],
|
||||
"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.14.2"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 5
|
||||
}
|
||||
Reference in New Issue
Block a user