{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "22af19e1",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-0.5099999999999999\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 16808 characters]\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "import numpy as np\n",
    "\n",
    "#I = 0.81 A\n",
    "I_Zn = [0.2, 0.4, 0.6, 0.8, 1]\n",
    "U_Zn = [-0.09, -0.18, -0.30, -0.42, -0.48]\n",
    "\n",
    "k, b = np.polyfit(I_Zn, U_Zn, deg = 1)\n",
    "\n",
    "U = []\n",
    "for i in range(5):\n",
    "    U.append(k * I_Zn[i] + b) \n",
    "\n",
    "#U_Zn_34 = 204 muV l = 10 mm L34 = 4 mm a = 0.08 mm\n",
    "\n",
    "plt.scatter(I_Zn, U_Zn)\n",
    "plt.grid()\n",
    "plt.plot(I_Zn, U)\n",
    "plt.xlabel('B, Тл')\n",
    "plt.ylabel('U, мкВ')\n",
    "print(k)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "2ae67d3e",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "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.9.12"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
