I want to draw a line from block 2 to block 7 but I get this error (! Package pgf Error: No shape named m-2-2 is known)
\tikzset{
desicion/.style={
diamond,
draw,
text width=5em,
text badly centered,
inner sep=0pt
},
block/.style={
rectangle,
draw,
text width=10em,
text centered,
rounded corners
},
cloud/.style={
draw,
ellipse,
minimum height=2em
},
descr/.style={
fill=white,
inner sep=2.5pt
},
connector/.style={
-latex,
font=\scriptsize
},
rectangle connector/.style={
connector,
to path={(\tikztostart) -- ++(#1,0pt) \tikztonodes |- (\tikztotarget) },
pos=0.5
},
rectangle connector/.default=-2cm,
straight connector/.style={
connector,
to path=--(\tikztotarget) \tikztonodes
}
}
\begin{tikzpicture}
\matrix (m)[matrix of nodes, column sep=2cm,row sep=8mm, align=center, nodes={rectangle,draw, anchor=center} ]
{
|[block]| {Start} & \\
|[desicion]| {$d^{(i)}_{(n,m)} < 2r$?} & \\
|[block]| {Estimate $I_{n,p}^{(i)} \rightarrow FBS_m$ } & \\
|[block]| {Estimate $\zeta^{(i*)}$ and $\varphi^{(i*)}_{n,p}$} & \\
|[desicion]| {$o^{(i+1)}_{(n,m)} > o^{(i)}_{(n,m)}$?} & \\
|[block]| {Apply} & \\
|[block]| {End} & \\
};
\path [>=latex,->] (m-1-1) edge (m-2-1);
\path [>=latex,->] (m-2-1) edge (m-3-1);
\path [>=latex,->] (m-3-1) edge (m-4-1);
\path [>=latex,->] (m-4-1) edge (m-5-1);
\path [>=latex,->] (m-5-1) edge (m-6-1);
\path [>=latex,->] (m-6-1) edge (m-7-1);
\path [>=latex,->] (m-2-2) edge (m-7-2);
\end{tikzpicture}
\draw [>=latex,->] (m-2-1) -- ++(3,0) |- (m-7-1);
or\draw [>=latex,->] (m-2-1.east) to[bend left] (m-7-1.east);
, or do you want a vertical arrow running parallel to the blocks in the first column?nodes in empty cells
to thematrix
options. This will assign a name to all empty positions in second column.