数学建模社区-数学中国
标题: * XeTeX is required to compile this document. [打印本页]
作者: smile921 时间: 2011-3-8 22:17
标题: * XeTeX is required to compile this document.
- r( U0 w: _, N; d* Z ********************************************
* XeTeX is required to compile this document.
* Sorry!
********************************************.
\RequireXeTeX ...********************************}
\endgroup \fi
l.25 \RequireXeTeX
. \7 ~9 u8 H W( W I: M
? 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.
4 ^3 T9 |1 {" ]" X6 k5 }* L4 P?
9 r: J w2 C4 g4 |
************************************************************************************
源码:
% -*- coding: utf-8 -*-
3 m' t/ V- I- g' _- h6 e: I5 Z, p
; ~- C. p9 ?& v$ ]. Z
% This LaTeX was auto-generated from an M-file by MATLAB.
% To make changes, update the M-file and republish this document.
% F+ ~/ ?6 m7 {, Y
\documentclass{article}
\usepackage{graphicx}
\usepackage{color}
7 s% W- S" J1 [9 ~* l. W2 w0 |% ++++++++++++ attach the following code
% 10:56上午,添加中文支持模块
9 o |* N) i+ D2 u6 l% A( ~
\usepackage{xeCJK}
\setCJKmainfont{FangSong_GB2312}
% ++++++++++++ finish attaching
! a% w9 S4 F! J' _9 n9 o, f8 g\sloppy
\definecolor{lightgray}{gray}{0.5}
\setlength{\parindent}{0pt}
8 @: D6 g! m+ q9 d" F. Z$ |! C7 N
\begin{document}
* V, t I: a4 L
. f3 g% m [9 B' Y
\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}
5 u& d2 J- X# ?1 n0 m0 x7 n
\includegraphics [width=4in]{kalmanfilter_01.eps}
2 a/ `' Q# P- l% L2 Y1 N, T\includegraphics [width=4in]{kalmanfilter_02.eps}
/ b9 c: `. |& _5 [7 o: C. {/ K) D\includegraphics [width=4in]{kalmanfilter_03.eps}
" n7 _/ F4 y7 b8 m1 F
4 ]7 i( u3 E' p2 `( P$ z# ~6 m. U
\end{document}
5 U0 l) D9 m1 E- D5 e! }7 B; W1 {, ~2 ?* y& _% C6 Y8 o
" w% `1 P6 y: ~
作者: smile921 时间: 2011-3-8 22:18
求正解 .6 o! e) J; g- X
谢谢
作者: madio 时间: 2011-3-10 03:58
我记得给你回复过了,你的这个文档中间的文本部分有几行不是latex的代码,修改一下,其他的就是需要使用xetex进行编译,较早的版本需要使用命令行形式编译,ctex5.6以上的版本可以直接通过界面的按钮编译,点击那个写着xelatex的按钮就可以编译成功,最后点击有pdf标志的按钮就可以看到结果,因为这个格式的直接生成pdf文档。
| 欢迎光临 数学建模社区-数学中国 (http://www.madio.net/) |
Powered by Discuz! X2.5 |