
Estoy estancado en cómo hacer esto por completo.
Tengo la siguiente imagen que necesito hacer usando Latex. Necesito poner la siguiente imagen en mi tarea.
Una forma en que sé que se puede hacer es poner esta imagen en una carpeta y luego usarla,
\includegraphics
pero eso no está permitido y la imagen tampoco se ve bien.
¿Hay alguna manera de hacer este dibujo en mi tarea sin tener que usarlo \includegraphics
?
Si alguien pudiera ayudarme a hacer este dibujo se lo agradecería mucho.
Aquí está la imagen:
Respuesta1
Creo que esta pregunta ya se ha formulado en varias variaciones. Aquí hay una respuesta más.
\documentclass[tikz,border=3mm]{standalone}
\usetikzlibrary{positioning,matrix}
\begin{document}
\begin{tikzpicture}[Dotted/.style={% https://tex.stackexchange.com/a/52856/194703
line width=1.2pt,
dash pattern=on 0.01\pgflinewidth off #1\pgflinewidth,line cap=round,
shorten >=0.3em,shorten <=0.3em},
Dotted/.default=5]
\matrix[matrix of math nodes,nodes={circle,draw,minimum size=1.5em},
column sep=2em,row sep=1ex](mat) {
C_1 & D_1 \\
C_2 & D_2 \\[2em]
C_m & D_n \\
};
\draw[Dotted] (mat-2-1) -- (mat-3-1);
\draw[Dotted] (mat-2-2) -- (mat-3-2);
\foreach \X in {1,2,3}
{\foreach \Y in {1,2,3}
{\draw (mat-\X-1) -- (mat-\Y-2);}}
\matrix[matrix of math nodes,nodes={circle,draw,minimum size=1.5em},
column sep=1em,below=2em of mat,xshift=2em,
column 2/.style={column sep=2.5em}](mat2) {
E_1 & E_2 & E_p\\
};
\draw[Dotted] (mat2-1-2) -- (mat2-1-3);
\end{tikzpicture}
\end{document}