7 e* E7 L( p% `% E6 O. a ******************************************** * XeTeX is required to compile this document. * Sorry! ********************************************. \RequireXeTeX ...********************************} \endgroup \fi l.25 \RequireXeTeX 9 [# G) ]- [6 B* [$ Q/ F7 @) X* e
? h This error message was generated by an \errmessage command, so I can't give any explicit help. Pretend that you're Hercule Poirot: Examine all clues, and deduce the truth by order and method.
0 `9 Q T4 E$ X7 w& k: N?
5 V4 o2 N* Z7 [+ R$ h' w8 f************************************************************************************ 源码: % -*- coding: utf-8 -*- + O) ^" [0 q/ D% Y5 G
/ f9 P6 u' `* g, f
% This LaTeX was auto-generated from an M-file by MATLAB. % To make changes, update the M-file and republish this document.
7 i4 M; d5 Y- R0 i# T\documentclass{article} \usepackage{graphicx} \usepackage{color}
7 n5 f, X/ A. |6 E v3 m9 u( t* E% ++++++++++++ attach the following code % 10:56上午,添加中文支持模块 f" c/ T9 X! b# P2 u8 p& D! e
\usepackage{xeCJK} \setCJKmainfont{FangSong_GB2312} % ++++++++++++ finish attaching 9 X. F$ `4 j6 A( X! P- o% Z
\sloppy \definecolor{lightgray}{gray}{0.5} \setlength{\parindent}{0pt}
' ?% b6 t9 b# O& A\begin{document} 8 G% [' {9 {' a5 |& w: p7 ^2 `
4 [# W' O, u2 U
\begin{verbatim} %fhunction kalmanfilter % 2010-4-15, luyz23, 从MATLAB到latex的简单示例 % >> publish('kalmanfilter.m','latex') % -*- 卡尔曼滤波 -*- % 此范例源自:网络论坛,在此感谢 clear N=800; w(1)=0; w=randn(1,N); %系统预测的随机白噪声 x(1)=0; a=1; for k=2:N; x(k)=a*x(k-1)+w(k-1); %系统的预测值 end V=randn(1,N); %测量值的随机白噪声 q1=std(V); Rvv=q1.^2; q2=std(x); Rxx=q2.^2; q3=std(w); Rww=q3.^2; c=0.2; Y=c*x+V; %测量值 p(1)=0; s(1)=0; for t=2:N; p1(t)=a.^2*p(t-1)+Rww; %前一时刻X的相关系数 b(t)=c*p1(t)/(c.^2*p1(t)+Rvv); %卡尔曼增益 s(t)=a*s(t-1)+b(t)*(Y(t)-a*c*s(t-1)); %经过滤波后的信号 p(t)=p1(t)-c*b(t)*p1(t);%t状态下x(t|t)的相关系数 end figure(1); plot(x); title('系统的预测值'); figure(2); plot(Y); title('测量值'); figure(3); plot(s); title('滤波后的信号'); \end{verbatim}
4 t6 N4 O% h, z5 u9 V\includegraphics [width=4in]{kalmanfilter_01.eps}
# s0 q7 z: h1 W\includegraphics [width=4in]{kalmanfilter_02.eps} % Y! u! X# O& C; j% O8 N
\includegraphics [width=4in]{kalmanfilter_03.eps} 0 Y9 L/ _: G) ]% U6 k& i- g
1 H% j/ i. s) X+ ?- c/ [, W- w7 l- u w
\end{document} / g4 _; D* e; o( |# ]7 @, N
; Q* A! a4 v( @
: O4 x# V" c( |! q4 q+ J
|