matlab 画图精度,tikz画图的精度是不是不够高

## 编译环境

操作系统

* [x] Windows 7/8/10

* [ ] macOS

* [ ] Linux

`若需勾选,请把[ ]改成[x]`

Tex发行版

* [x ] TexLive `年份`

* [ ] MikTeX `版本号`

* [ ] CTeX

`若需勾选,请把[ ]改成[x]`

## 我的问题

是这样的,我想画出一个函数$y=1-e^{-11.76x}\cos(15.68x)-\dfrac{3}{4}e^{-11.76x}\sin(15.68x)$的图像的时候,用tikz画图和用MATLAB画图的结果不太一样,其中tikz画图的MWE如下:

>\documentclass[11pt,a4paper,no-math]{ctexart}

\usepackage{amsmath,amssymb,amsthm}

\usepackage{mathrsfs}

\usepackage{tikz}%画图使用

\begin{document}

\begin{figure}[htbp]

\centering

\begin{tikzpicture}

\draw[-stealth] (-0.1,0)--(3,0) node[right]{$t$};

\draw[-stealth] (0,-0.1)--(0,2) node[right]{$c(t)$};

\draw[domain=0:3,samples=2000] plot(\x,{1-exp(-11.76*\x)*cos(15.68*\x)-0.75*exp(-11.76*\x)*sin(15.68*\x)});

\draw[style=dashed] (0,1) node[left]{$1$} --(3,1);

\end{tikzpicture}

\caption{2004年第三题单位阶跃响应曲线}\label{fig:1.3.3}

\end{figure}

\end{document}

MATLAB代码如下:

>clear all

clc

close all

t=0:0.01:2;

y=1-exp(-11.76.*t).*cos(15.68.*t)-0.75*exp(-11.76.*t).*cos(15.68.*t);

plot(t,y,'r');

这两个画出图像的时候有一点差别,不知道是不是因为tikz画图本身精度不是很高的问题。

提问于 2020-10-19 10:45

741ddce5195542c333bbe118aebabd72.gif

you are theyou are the

0

0

回答数3提问数

3文章数

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值