clwn.net
当前位置:首页 >> mAtlAB做y=3*sin(t)*E^(%t),t为[%2pi,2pi] 求源代码 >>

mAtlAB做y=3*sin(t)*E^(%t),t为[%2pi,2pi] 求源代码

t=0:0.01:pi; y=exp(-t/3).*(sin(2*t)+2*sin(4*t) +0.4*sin(2*t).*俯筏碘禾鄢鼓碉态冬卡sin(40*t)); plot(t,y)

t=-0.01:0.001:0.01 x=sin(100*2*pi*t)+2*sin(140*2*pi*t) plot(t,x)

为什么一定要用for语句呢???直接画也可以吧..t=0:0.00001:0.1;y=sin(314*t);plot(t,y);grid

clear,close all,t=-5:0.01:5; ut=sin(t); x=exp(-0.5*t).*ut; y=exp(-0.75*t+3).*sin(1.5*t+3); subplot(211) plot(t,x) grid on,xlabel('t(sec)'),ylabel('x(mm)') title('Original signal x(t)') subplot(212) plot(t,y) grid on,xlabel('t(sec)'),ylabel('y(mm)') title('y=exp(-0.75*t+3).*sin(1.5*t+3)') 按上面语句试试

t=0:0.05:5;x=exp(t).*sin(t);y=2*exp(t).*cos(t);plot3(x,y,t)

function zd0412function dy=odefun(t,y)dy=[y(2); 3*sin(2*t)+exp(t)*y(1)-t*y(2)];endtspan=[0,2];y0=[1;-1][t,y]=ode45(@odefun,tspan,y0);plot(t,y(:,1))end

ezplot3('t^3*sin(3*t)*exp(t)','t^3*cos(3*t)*exp(t)','t^2',[0 2*pi])

你好!clear x=-1:0.01:1; y=(x.^3).*exp(-x.^2); plot(x,y) 希望对你有所帮助,望采纳.

Your code should be written like below.clear all theta = 0:.01*pi:3*pi; y1 = sin(theta); y2 = 3*exp(-0.5*theta); plot(theta,y1,theta,y2) xlabel('theta [Deg]'), ylabel('value'); legend('sin(t)','3exp(-0.5t)','Location','southeast') grid on, axis image;The generated graph is shown below.Thumb UP!

要看x(t)与y(t)的关系:clear all;clc;t=-2:0.02:10;xt=1100*exp(-0.1386*t);yt=6600*(exp(-0.1155*t)-exp(-0.1386*t));plot(xt,yt);要看三维关系:clear all;clc;t=-2:0.02:10;xt=1100*exp(-0.1386*t);yt=6600*(exp(-0.1155*t)-exp(-0.1386*t));plot3(t,xt,yt);grid on;

相关文档
wlbk.net | ydzf.net | mydy.net | hyqd.net | bdld.net | 网站首页 | 网站地图
All rights reserved Powered by www.clwn.net
copyright ©right 2010-2021。
内容来自网络,如有侵犯请联系客服。zhit325@qq.com