我想打电话 ef 对于子图,但它没有按预期工作。我们如何解决这个问题?
这是我在背页的代码:
\usepackage{subcaption}
\usepackage{graphix}
\begin{document}
The numerical results are shown in \ref{smpc_and_mpc}.
\begin{figure}[ht]
\centering
\begin{subfigure}{\textwidth}
\centering
\includegraphics[width=0.95\textwidth]{Gambar/mpc_FPA.eps}`
\caption{MPC`}
\\label{subfig:mpc}`
\end{subfigure}
\begin{subfigure}{\textwidth}
\centering
\includegraphics[width=0.95\textwidth]{Gambar/SMPC.eps}
\caption{SMPC}
\label{subfig:smpc}
\end{subfigure}
\caption{Flight path angle responses tested using 200 different parameters with 20\% deviation about nominal values of $a_{13}$ and $a_{23}$}
\label{smpc_and_mpc}
\end{figure}
\ref{subfig:mpc} and \ref{subfig:smpc} compare the flight path angle responses of MPC and SMPC, using parameters from \ref{tabel_SMPC}.
\end{document}
`
我们期望的输出是
图1(a)和图1(b)使用表1中的参数比较了MPC和SMPC的飞行航迹角响应。但是,它无法正常工作。输出如下:
图 1a 和图 1b 使用表 1 中的参数比较了 MPC 和 SMPC 的飞行航迹角响应。
\documentclass{article}
\usepackage{graphicx}
\usepackage[labelformat=simple]{subcaption}
\renewcommand\thesubfigure{(\alph{subfigure})}
\begin{document}
The numerical results are shown in \ref{smpc_and_mpc}.
\begin{figure}[ht]
\centering
\begin{subfigure}{\textwidth}
\centering
\includegraphics[width=0.5\textwidth]{example-image-duck}
\caption{MPC}
\label{subfig:mpc}
\end{subfigure}
\begin{subfigure}{\textwidth}
\centering
\includegraphics[width=0.5\textwidth]{example-image-duck}
\caption{SMPC}
\label{subfig:smpc}
\end{subfigure}
\caption{Flight path angle responses tested using 200 different parameters with 20\% deviation about nominal values of $a_{13}$ and $a_{23}$}
\label{smpc_and_mpc}
\end{figure}
\ref{subfig:mpc} and \ref{subfig:smpc} compare the flight path angle responses of MPC and SMPC, using parameters from \ref{smpc_and_mpc}.
\end{document}