$ ~: M: V4 \6 ]$ g) q
******************************************** * XeTeX is required to compile this document. * Sorry! ********************************************. \RequireXeTeX ...********************************} \endgroup \fi l.25 \RequireXeTeX
1 Q4 j% N* b4 N+ m6 A? 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.
, d3 U) J: g( P0 m; K?
L& Y% }: P6 U. n* I************************************************************************************ 源码: % -*- coding: utf-8 -*- . e; E7 g( n; h: }( H6 F' ~3 n
, i$ `- H/ h2 L3 B
% This LaTeX was auto-generated from an M-file by MATLAB. % To make changes, update the M-file and republish this document. / j1 Z( \% G) V$ c8 }
\documentclass{article} \usepackage{graphicx} \usepackage{color} - ^& t' z. ]4 v- m& x w2 y- d0 ?4 W2 L
% ++++++++++++ attach the following code % 10:56上午,添加中文支持模块 : t' a0 ~% \9 @
\usepackage{xeCJK} \setCJKmainfont{FangSong_GB2312} % ++++++++++++ finish attaching
4 _7 }8 q3 _/ a/ L% L# E\sloppy \definecolor{lightgray}{gray}{0.5} \setlength{\parindent}{0pt} & l4 S: l# a$ s4 u
\begin{document}
5 C( M( x6 h6 A p: g. G& D) K, B* S! Q) k" L2 G0 n
\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} . H1 x1 Z! u! b3 z+ R
\includegraphics [width=4in]{kalmanfilter_01.eps}
' N3 m; O$ O. W' S# L" X. \\includegraphics [width=4in]{kalmanfilter_02.eps}
4 o" o2 z0 ]. I& @' ?" ?\includegraphics [width=4in]{kalmanfilter_03.eps} 4 k+ H' {9 j0 Z- e" t5 D8 _+ `
" v2 d) ?, I+ p2 Y2 O: ~8 V
/ l& V6 L& D) Z0 _# {0 I\end{document} 3 m* g. h- Z0 N5 S7 I9 C8 z2 {0 {
. `' @9 @+ e% u/ U2 ^! ^6 l5 ~9 {# D
$ T! n& X% p$ k3 |: P |