Skip to content

Commit

Permalink
Add offset in formula
Browse files Browse the repository at this point in the history
  • Loading branch information
HansOlsson committed Feb 22, 2021
1 parent 43049b2 commit fc0ce17
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions chapters/functions.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1370,7 +1370,7 @@ \subsection{Using the Derivative Annotation}\label{using-the-derivative-annotati
function f "Simple table lookup"
input Real x;
input Real y[:, 2];
input Real offset;
input Real offset "Shortened to o below";
output Real z;
algorithm
$\ldots$
Expand Down Expand Up @@ -1416,8 +1416,8 @@ \subsection{Using the Derivative Annotation}\label{using-the-derivative-annotati
\end{lstlisting}
In the example above \lstinline!zeroDerivative=y! implies that
\begin{eqnarray*}
\frac{d}{dt}f(x(t),y(t))&=&\frac{\partial f}{\partial x}\frac{dx}{dt}+\frac{\partial f}{\partial y}\frac{dy}{dt}\\
&=&\frac{\partial f}{\partial x}\frac{dx}{dt}+\frac{\partial f}{\partial y}\cdot 0\\
\frac{d}{dt}f(x(t),y(t))&=&\frac{\partial f}{\partial x}\frac{dx}{dt}+\frac{\partial f}{\partial y}\frac{dy}{dt}+\frac{\partial f}{\partial o}\frac{do}{dt}\\
&=&\frac{\partial f}{\partial x}\frac{dx}{dt}+\frac{\partial f}{\partial y}\cdot 0+\frac{\partial f}{\partial o}\cdot 0\\
&=&\frac{\partial f}{\partial x}\frac{dx}{dt}
\end{eqnarray*}
\end{nonnormative}
Expand Down

0 comments on commit fc0ce17

Please sign in to comment.