matlab设置自定义周期函数 您所在的位置:网站首页 函数周期表达式怎么写 matlab设置自定义周期函数

matlab设置自定义周期函数

2024-02-18 09:51| 来源: 网络整理| 查看: 265

T=T1+T2    →→→→→0.78=0.7+0.08

在一个大周期内分为了两个小周期.

T1内:

clear all; v_1=0:0.01:0.7; y_1=(0.00057*exp(v_1/sqrt(0.24/9.81))/sqrt(0.24/9.81)+0.0206*exp(-v_1/sqrt(0.24/9.81))/sqrt(0.24/9.81))+0.06/0.7; plot(v_1,y_1)

图像为:

 T2内:

v_2=0.7:0.00114:0.78; y_2=0.41*cos((v_2-0.86)/(sqrt(0.24/9.81)))+(0.34/sqrt(0.24/9.81))*sin((v_2-0.86)/sqrt(0.24/9.81)); plot(v_2,y_2)

 图像为:

 单周期T内:

clear all; v_1=0:0.01:0.7; v_2=0.7:0.00114:0.78; y_1=(0.00057*exp(v_1/sqrt(0.24/9.81))/sqrt(0.24/9.81)+0.0206*exp(-v_1/sqrt(0.24/9.81))/sqrt(0.24/9.81))+0.06/0.7; y_2=0.41*cos((v_2-0.86)/(sqrt(0.24/9.81)))+(0.34/sqrt(0.24/9.81))*sin((v_2-0.86)/sqrt(0.24/9.81)); plot(v_1,y_1) plot(v_2,y_2) s=[y_1 y_2]; v=[v_1 v_2]; plot(v,s)

图像为:

用矩阵,执行一次储存一次,并设置好变量长度

clear all; v_1=0:0.01:0.7; v_2=0.7:0.00114:0.78; y_1=(0.00057*exp(v_1/sqrt(0.24/9.81))/sqrt(0.24/9.81)+0.0206*exp(-v_1/sqrt(0.24/9.81))/sqrt(0.24/9.81))+0.06/0.7; y_2=0.41*cos((v_2-0.86)/(sqrt(0.24/9.81)))+(0.34/sqrt(0.24/9.81))*sin((v_2-0.86)/sqrt(0.24/9.81)); plot(v_1,y_1) plot(v_2,y_2) s=[y_1 y_2]; v=[v_1 v_2]; plot(v,s) y=[]; x=[v]; for i=1:4 y=[y s]; end for j=1:3 v1=0.78*j+v_1; v2=0.78*j+v_2; x=[x v1 v2]; end plot(x,y)

 三周期图像如图

 

 



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有