von K7N2-Delta » Fr 27. Feb 2015, 10:45
Hallo,
ich bekomme so langsam ein schlechtes Gewissen weil ich euch ständig meine Arbeit machen lasse aber ich bin anscheinend zu begriffsstutzig für pgfplots
Ich möchte in folgenden Minimalbeispiel drei Tangenten an der Kennlinie anzeichnen, bei Ib =25, Ib=50 und Ib= 75
Ich hoffe mit dem Beispiel aus pgfplots Kap. 3.3.4 bin ich schon auf einem gutem Weg.. nun muss ich nur noch aus der linearen Regression eine Tangente machen.. ja und da hakt es mal wieder bei mir.
Muss ich, um ein Bild hochzuladen, eigentlich angemeldet sein?
\documentclass[10pt,a4paper,liststotoc]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{textcomp} %für \textmu
\usepackage{multirow} % Zeilen in Tabelle verbinden
\usepackage{caption, booktabs} %Tabellenüberschrift
\usepackage{siunitx} % Formats the units and values
\usepackage{pgfplotstable} % Generates table from .csv
% Setup siunitx:
\sisetup{
round-mode = places, % Rounds numbers
round-precision = 2, % to 2 places
}
\usepackage{float}
\newfloat{diagramm}{tbh}{los}[section] %Diagrammunterschrift
\floatname{diagramm}{Diagramm}
\usepackage{tikz,pgfplots}
\pgfplotsset{
width=0.8\textwidth,
height=0.5\textwidth,
compat=newest,
title style={at={(0.5,1.2)}}% Position der Überschrift
}
\usepackage{filecontents}
\begin{filecontents*}{211b.txt}
Ib Ic Ube Uce
#in mA in mA in mV in V
25 5.33 690 0.130
25 6 690 0.146
25 7.57 692 0.190
25 8 698 0.215
25 8.19 699 0.230
25 8.85 700 0.466
25 9 700 0.694
25 11.09 665 9.600
#
50 5.35 693 0.93
50 10 711 0.146
50 14 720 0.240
50 16 718 0.336
50 18 716 0.550
50 19.2 709 1.450
50 20.6 693 3.190
50 22.75 670 7.000
#
75 5.35 697 0.78
75 9.99 715 0.115
75 14.97 729 0.168
75 20 733 0.312
75 22.3 731 0.400
75 26.2 734 0.740
75 27.89 728 1.590
75 32.15 690 4.830
\end{filecontents*}
\begin{document}
\begin{diagramm}[H]
\centering
\begin{tikzpicture}
\begin{axis}[
% title={\textbf{Verlauf der Eingangskennlinie bei $ U_{CE} $= 5V } },
xlabel = $U_\mathrm{BE} $ in mV ,
ylabel = $I_\mathrm{B}$ in \textmu A ,
legend style={at={(0,1.02)},anchor=south west,cells={anchor=west}},
]
\addplot table[x expr=\thisrow{UBE}, y=Ib] {211a.txt};
\draw [decorate,color=black!80!black] (105,55)--(200,55)
node [midway,anchor=north,inner sep=1pt, outer sep=5pt]{\tiny \quad $ \Delta U_\mathrm{BE} $};
\draw [decorate,color=black] (200,55) -- (200,105)
node [midway,anchor=west,inner sep=1pt, outer sep=1pt]{\tiny $ \Delta I_\mathrm{B} $ };
% Anlegen der Tangente:
\addplot table[
x=UBE,
y={create col/linear regression={y=Ib}}]
{211a.txt};
\legend{ $I_\mathrm{B} $ = f($U_\mathrm{BE} $)}
\end{axis}
\end{tikzpicture}
\caption{Verlauf der Eingangskennlinie bei $U_\mathrm{CE} $= 5V}
\end{diagramm}
\end{document}
Hallo,
ich bekomme so langsam ein schlechtes Gewissen weil ich euch ständig meine Arbeit machen lasse aber ich bin anscheinend zu begriffsstutzig für pgfplots :oops:
Ich möchte in folgenden Minimalbeispiel drei Tangenten an der Kennlinie anzeichnen, bei Ib =25, Ib=50 und Ib= 75
Ich hoffe mit dem Beispiel aus pgfplots Kap. 3.3.4 bin ich schon auf einem gutem Weg.. nun muss ich nur noch aus der linearen Regression eine Tangente machen.. ja und da hakt es mal wieder bei mir.
Muss ich, um ein Bild hochzuladen, eigentlich angemeldet sein?
[code]
\documentclass[10pt,a4paper,liststotoc]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{textcomp} %für \textmu
\usepackage{multirow} % Zeilen in Tabelle verbinden
\usepackage{caption, booktabs} %Tabellenüberschrift
\usepackage{siunitx} % Formats the units and values
\usepackage{pgfplotstable} % Generates table from .csv
% Setup siunitx:
\sisetup{
round-mode = places, % Rounds numbers
round-precision = 2, % to 2 places
}
\usepackage{float}
\newfloat{diagramm}{tbh}{los}[section] %Diagrammunterschrift
\floatname{diagramm}{Diagramm}
\usepackage{tikz,pgfplots}
\pgfplotsset{
width=0.8\textwidth,
height=0.5\textwidth,
compat=newest,
title style={at={(0.5,1.2)}}% Position der Überschrift
}
\usepackage{filecontents}
\begin{filecontents*}{211b.txt}
Ib Ic Ube Uce
#in mA in mA in mV in V
25 5.33 690 0.130
25 6 690 0.146
25 7.57 692 0.190
25 8 698 0.215
25 8.19 699 0.230
25 8.85 700 0.466
25 9 700 0.694
25 11.09 665 9.600
#
50 5.35 693 0.93
50 10 711 0.146
50 14 720 0.240
50 16 718 0.336
50 18 716 0.550
50 19.2 709 1.450
50 20.6 693 3.190
50 22.75 670 7.000
#
75 5.35 697 0.78
75 9.99 715 0.115
75 14.97 729 0.168
75 20 733 0.312
75 22.3 731 0.400
75 26.2 734 0.740
75 27.89 728 1.590
75 32.15 690 4.830
\end{filecontents*}
\begin{document}
\begin{diagramm}[H]
\centering
\begin{tikzpicture}
\begin{axis}[
% title={\textbf{Verlauf der Eingangskennlinie bei $ U_{CE} $= 5V } },
xlabel = $U_\mathrm{BE} $ in mV ,
ylabel = $I_\mathrm{B}$ in \textmu A ,
legend style={at={(0,1.02)},anchor=south west,cells={anchor=west}},
]
\addplot table[x expr=\thisrow{UBE}, y=Ib] {211a.txt};
\draw [decorate,color=black!80!black] (105,55)--(200,55)
node [midway,anchor=north,inner sep=1pt, outer sep=5pt]{\tiny \quad $ \Delta U_\mathrm{BE} $};
\draw [decorate,color=black] (200,55) -- (200,105)
node [midway,anchor=west,inner sep=1pt, outer sep=1pt]{\tiny $ \Delta I_\mathrm{B} $ };
% Anlegen der Tangente:
\addplot table[
x=UBE,
y={create col/linear regression={y=Ib}}]
{211a.txt};
\legend{ $I_\mathrm{B} $ = f($U_\mathrm{BE} $)}
\end{axis}
\end{tikzpicture}
\caption{Verlauf der Eingangskennlinie bei $U_\mathrm{CE} $= 5V}
\end{diagramm}
\end{document}
[/code]