matlab0阶贝塞尔函数,零阶一类贝塞尔函数曲线及其包络线matlab源程序学步园...

更新时间:2023-05-20 09:06:17 阅读: 评论:0

matlab0阶贝塞尔函数,零阶⼀类贝塞尔函数曲线及其包络线
matlab源程序学步园...
co前缀
性欲强的人废话不多说,请看源程序:
clear ,clc;
format long
x=(0:0.01:100)';
y_0=beslj(0,x);
% y_1=beslj(1,x); %⼀阶,这⾥只画了0阶
% y_2=beslj(2,x); %⼆阶
plot(x,y_0);grid on;
axis([0,100,-1,1]);
title('0阶贝塞尔函数曲线图');
xlabel('Variable X');
ylabel('Variable Y');
%画包络线
hold on;
[up,down] = envelope(x,y_0,'spline');
plot(x, up, 'r');
plot(x, down, 'r');
其中的envelope是个单独的.m⽂件,是个函数,⽤来画包络线。说⽩了就是求拐点然后插值:
function [up,down] = envelope(x,y,interpMethod)
%ENVELOPE gets the data of upper and down envelope of the known input (x,y).
%
% Input parameters:
% x the abscissa of the given data
% y the ordinate of the given data
% interpMethod the interpolation method
%
% Output parameters:
% up the upper envelope, which has the same length as x.
% down the down envelope, which has the same length as x.
%龟兔赛跑图片绘画
% See also DIFF INTERP1
% Designed by: Lei Wang, , 11-Mar-2003.
% Last Revision: 21-Mar-2003.
% Dept. Mechanical & Aerospace Engineering, NC State University. % $Revision: 1.1 $ $Date: 3/21/2003 10:33 AM $
if length(x) ~= length(y)
error('Two input data should have the same length.');
end
if (nargin < 2)|(nargin > 3),
error('Plea e help for INPUT DATA.');
elif (nargin == 2)初三化学化合价
interpMethod = 'linear';
end
% Find the extreme maxim values
% and the corresponding indexes
%----------------------------------------------------
extrMaxValue = y(find(diff(sign(diff(y)))==-2)+1);
extrMaxIndex = find(diff(sign(diff(y)))==-2)+1;
% Find the extreme minim values
% and the corresponding indexes优秀日记500字
%----------------------------------------------------
extrMinValue = y(find(diff(sign(diff(y)))==+2)+1);
extrMinIndex = find(diff(sign(diff(y)))==+2)+1;
up = extrMaxValue;
up_x = x(extrMaxIndex);
down = extrMinValue;
down_x = x(extrMinIndex);
% Interpolation of the upper/down envelope data元旦的诗词
%----------------------------------------------------
up = interp1(up_x,up,x,interpMethod);
down = interp1(down_x,down,x,interpMethod);
效果:
周国平作品csdn上传资源标签⾥竟然没有Matlab,桑不起啊。。。。
>忘怀的意思

本文发布于:2023-05-20 09:06:17,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/82/705579.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:函数   资源   标签   赛跑   源程序   性欲强   插值   意思
相关文章
留言与评论(共有 0 条评论)
   
验证码:
推荐文章
排行榜
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图