zadanie wykresy

This commit is contained in:
Fingal 2016-11-21 00:54:08 +01:00
parent 0033252110
commit ba540aa912
3 changed files with 420 additions and 0 deletions

103
zajęcia 6/main.tex Normal file
View File

@ -0,0 +1,103 @@
\documentclass[a4paper]{article}
%% Language and font encodings
\usepackage[utf8]{inputenc}
\usepackage{polski}
\usepackage[T1]{fontenc}
%% Sets page size and margins
\usepackage[a4paper,top=3cm,bottom=2cm,left=3cm,right=3cm,marginparwidth=1.75cm]{geometry}
%% Useful packages
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage{dsfont}
\usepackage{geometry}
\usepackage{physics}
\usepackage{tikz}
\usepackage{pgfplots}
\newtheorem{definition}{Definicja}
\title{Wykresy}
\author{Andrzej Kokosza}
\begin{document}
\maketitle
\begin{tikzpicture}[scale=0.5,domain=-3.5:3.5,samples=300]
\draw[very thin,gray,dotted] (-4.9,-2.9) grid (4.9,9.9);
\draw[->,thick] (-5,0) -- (5,0) node[right]{$x$};
\draw[->,thick] (0,-3) -- (0,10) node[above]{$f(x)$};
\draw[red,thick] plot (\x,{\x^2-2*\x+3}) node[right] {$f(x) = x^2-2x+3$};
\end{tikzpicture}
\begin{tikzpicture}
\begin{axis}[
title=$\cos(2x)$,
xlabel={$x$},
ylabel={$y$},
axis lines=middle,
]
\addplot[
samples=100,
green,domain=-2*pi:2*pi,
]
{cos(2*deg(x))};
\end{axis}
\end{tikzpicture}
\begin{tikzpicture}
\begin{axis}[
title=$\sin(\tfrac{1}{x})$,
xlabel={$x$},
ylabel={$y$},
]
\addplot[
samples=3000,
blue,domain=-0.0005:0.0005,
]
{sin(1/x)};
\end{axis}
\end{tikzpicture}
\begin{tikzpicture}
\begin{axis}[
title=$x^2+y^2$,
xlabel={$x$},
ylabel={$y$},
zlabel={$z$},
colorbar left,
colormap/cool,
]
\addplot3[surf]{x^2+y^2};
\end{axis}
\end{tikzpicture}
\begin{tikzpicture}
\begin{axis}[
title=$x^2+y^2$,
xlabel={$x$},
ylabel={$y$},
zlabel={$z$},
colorbar horizontal,
view/h=60,
view/v=60,
colormap/bluered,
]
\addplot3[surf]{x^2-y^2+2*x*y^2+1};
\end{axis}
\end{tikzpicture}
\begin{tikzpicture}[scale=0.5]
\draw[very thin,gray,dotted] (-3.9,-2.9) grid (3.9,10);
\draw[->,thick] (-4,0) -- (4,0) node[right]{$x$};
\draw[->,thick] (0,-3) -- (0,10) node[above]{$f(x)$};
\draw plot file {./test.txt};
\end{tikzpicture}
\end{document}

317
zajęcia 6/test.txt Normal file
View File

@ -0,0 +1,317 @@
# Curve 0 of 1, 300 points
# Curve title: "x*x-1"
# x y type
# Curve 0 of 1, 300 points
# Curve title: "sin(x)"
# x y type
# Curve 0 of 1, 300 points
# Curve title: "sin(x)"
# x y type
# Curve 0 of 1, 300 points
# Curve title: "x*x-1"
# x y type
-3.00000 8.00000 i
-2.97993 7.88000 i
-2.95987 7.76081 i
-2.93980 7.64242 i
-2.91973 7.52484 i
-2.89967 7.40806 i
-2.87960 7.29209 i
-2.85953 7.17692 i
-2.83946 7.06256 i
-2.81940 6.94901 i
-2.79933 6.83625 i
-2.77926 6.72431 i
-2.75920 6.61317 i
-2.73913 6.50284 i
-2.71906 6.39331 i
-2.69900 6.28458 i
-2.67893 6.17666 i
-2.65886 6.06955 i
-2.63880 5.96324 i
-2.61873 5.85774 i
-2.59866 5.75305 i
-2.57860 5.64915 i
-2.55853 5.54607 i
-2.53846 5.44379 i
-2.51839 5.34231 i
-2.49833 5.24164 i
-2.47826 5.14178 i
-2.45819 5.04272 i
-2.43813 4.94446 i
-2.41806 4.84702 i
-2.39799 4.75037 i
-2.37793 4.65453 i
-2.35786 4.55950 i
-2.33779 4.46527 i
-2.31773 4.37185 i
-2.29766 4.27924 i
-2.27759 4.18743 i
-2.25753 4.09642 i
-2.23746 4.00622 i
-2.21739 3.91682 i
-2.19732 3.82823 i
-2.17726 3.74045 i
-2.15719 3.65347 i
-2.13712 3.56730 i
-2.11706 3.48193 i
-2.09699 3.39737 i
-2.07692 3.31361 i
-2.05686 3.23066 i
-2.03679 3.14851 i
-2.01672 3.06717 i
-1.99666 2.98663 i
-1.97659 2.90690 i
-1.95652 2.82798 i
-1.93645 2.74986 i
-1.91639 2.67254 i
-1.89632 2.59603 i
-1.87625 2.52033 i
-1.85619 2.44543 i
-1.83612 2.37134 i
-1.81605 2.29805 i
-1.79599 2.22557 i
-1.77592 2.15389 i
-1.75585 2.08302 i
-1.73579 2.01295 i
-1.71572 1.94369 i
-1.69565 1.87524 i
-1.67559 1.80759 i
-1.65552 1.74074 i
-1.63545 1.67470 i
-1.61538 1.60947 i
-1.59532 1.54504 i
-1.57525 1.48142 i
-1.55518 1.41860 i
-1.53512 1.35658 i
-1.51505 1.29538 i
-1.49498 1.23498 i
-1.47492 1.17538 i
-1.45485 1.11659 i
-1.43478 1.05860 i
-1.41472 1.00142 i
-1.39465 0.94505 i
-1.37458 0.88948 i
-1.35452 0.83471 i
-1.33445 0.78075 i
-1.31438 0.72760 i
-1.29431 0.67525 i
-1.27425 0.62371 i
-1.25418 0.57297 i
-1.23411 0.52304 i
-1.21405 0.47391 i
-1.19398 0.42559 i
-1.17391 0.37807 i
-1.15385 0.33136 i
-1.13378 0.28546 i
-1.11371 0.24036 i
-1.09365 0.19606 i
-1.07358 0.15257 i
-1.05351 0.10989 i
-1.03344 0.06801 i
-1.01338 0.02693 i
-0.99331 -0.01333 i
-0.97324 -0.05280 i
-0.95318 -0.09145 i
-0.93311 -0.12931 i
-0.91304 -0.16635 i
-0.89298 -0.20259 i
-0.87291 -0.23803 i
-0.85284 -0.27266 i
-0.83278 -0.30648 i
-0.81271 -0.33950 i
-0.79264 -0.37172 i
-0.77258 -0.40313 i
-0.75251 -0.43373 i
-0.73244 -0.46353 i
-0.71237 -0.49252 i
-0.69231 -0.52071 i
-0.67224 -0.54809 i
-0.65217 -0.57467 i
-0.63211 -0.60044 i
-0.61204 -0.62541 i
-0.59197 -0.64957 i
-0.57191 -0.67292 i
-0.55184 -0.69547 i
-0.53177 -0.71722 i
-0.51171 -0.73816 i
-0.49164 -0.75829 i
-0.47157 -0.77762 i
-0.45151 -0.79614 i
-0.43144 -0.81386 i
-0.41137 -0.83077 i
-0.39130 -0.84688 i
-0.37124 -0.86218 i
-0.35117 -0.87668 i
-0.33110 -0.89037 i
-0.31104 -0.90326 i
-0.29097 -0.91534 i
-0.27090 -0.92661 i
-0.25084 -0.93708 i
-0.23077 -0.94675 i
-0.21070 -0.95560 i
-0.19064 -0.96366 i
-0.17057 -0.97091 i
-0.15050 -0.97735 i
-0.13043 -0.98299 i
-0.11037 -0.98782 i
-0.09030 -0.99185 i
-0.07023 -0.99507 i
-0.05017 -0.99748 i
-0.03010 -0.99909 i
-0.01003 -0.99990 i
0.01003 -0.99990 i
0.03010 -0.99909 i
0.05017 -0.99748 i
0.07023 -0.99507 i
0.09030 -0.99185 i
0.11037 -0.98782 i
0.13043 -0.98299 i
0.15050 -0.97735 i
0.17057 -0.97091 i
0.19064 -0.96366 i
0.21070 -0.95560 i
0.23077 -0.94675 i
0.25084 -0.93708 i
0.27090 -0.92661 i
0.29097 -0.91534 i
0.31104 -0.90326 i
0.33110 -0.89037 i
0.35117 -0.87668 i
0.37124 -0.86218 i
0.39130 -0.84688 i
0.41137 -0.83077 i
0.43144 -0.81386 i
0.45151 -0.79614 i
0.47157 -0.77762 i
0.49164 -0.75829 i
0.51171 -0.73816 i
0.53177 -0.71722 i
0.55184 -0.69547 i
0.57191 -0.67292 i
0.59197 -0.64957 i
0.61204 -0.62541 i
0.63211 -0.60044 i
0.65217 -0.57467 i
0.67224 -0.54809 i
0.69231 -0.52071 i
0.71237 -0.49252 i
0.73244 -0.46353 i
0.75251 -0.43373 i
0.77258 -0.40313 i
0.79264 -0.37172 i
0.81271 -0.33950 i
0.83278 -0.30648 i
0.85284 -0.27266 i
0.87291 -0.23803 i
0.89298 -0.20259 i
0.91304 -0.16635 i
0.93311 -0.12931 i
0.95318 -0.09145 i
0.97324 -0.05280 i
0.99331 -0.01333 i
1.01338 0.02693 i
1.03344 0.06801 i
1.05351 0.10989 i
1.07358 0.15257 i
1.09365 0.19606 i
1.11371 0.24036 i
1.13378 0.28546 i
1.15385 0.33136 i
1.17391 0.37807 i
1.19398 0.42559 i
1.21405 0.47391 i
1.23411 0.52304 i
1.25418 0.57297 i
1.27425 0.62371 i
1.29431 0.67525 i
1.31438 0.72760 i
1.33445 0.78075 i
1.35452 0.83471 i
1.37458 0.88948 i
1.39465 0.94505 i
1.41472 1.00142 i
1.43478 1.05860 i
1.45485 1.11659 i
1.47492 1.17538 i
1.49498 1.23498 i
1.51505 1.29538 i
1.53512 1.35658 i
1.55518 1.41860 i
1.57525 1.48142 i
1.59532 1.54504 i
1.61538 1.60947 i
1.63545 1.67470 i
1.65552 1.74074 i
1.67559 1.80759 i
1.69565 1.87524 i
1.71572 1.94369 i
1.73579 2.01295 i
1.75585 2.08302 i
1.77592 2.15389 i
1.79599 2.22557 i
1.81605 2.29805 i
1.83612 2.37134 i
1.85619 2.44543 i
1.87625 2.52033 i
1.89632 2.59603 i
1.91639 2.67254 i
1.93645 2.74986 i
1.95652 2.82798 i
1.97659 2.90690 i
1.99666 2.98663 i
2.01672 3.06717 i
2.03679 3.14851 i
2.05686 3.23066 i
2.07692 3.31361 i
2.09699 3.39737 i
2.11706 3.48193 i
2.13712 3.56730 i
2.15719 3.65347 i
2.17726 3.74045 i
2.19732 3.82823 i
2.21739 3.91682 i
2.23746 4.00622 i
2.25753 4.09642 i
2.27759 4.18743 i
2.29766 4.27924 i
2.31773 4.37185 i
2.33779 4.46527 i
2.35786 4.55950 i
2.37793 4.65453 i
2.39799 4.75037 i
2.41806 4.84702 i
2.43813 4.94446 i
2.45819 5.04272 i
2.47826 5.14178 i
2.49833 5.24164 i
2.51839 5.34231 i
2.53846 5.44379 i
2.55853 5.54607 i
2.57860 5.64915 i
2.59866 5.75305 i
2.61873 5.85774 i
2.63880 5.96324 i
2.65886 6.06955 i
2.67893 6.17666 i
2.69900 6.28458 i
2.71906 6.39331 i
2.73913 6.50284 i
2.75920 6.61317 i
2.77926 6.72431 i
2.79933 6.83625 i
2.81940 6.94901 i
2.83946 7.06256 i
2.85953 7.17692 i
2.87960 7.29209 i
2.89967 7.40806 i
2.91973 7.52484 i
2.93980 7.64242 i
2.95987 7.76081 i
2.97993 7.88000 i
3.00000 8.00000 i

BIN
zajęcia 6/wykresy.pdf Normal file

Binary file not shown.