悬链线 (Catenary)指的是一种曲线,指两端固定的一条(粗细与质量分布)均匀、柔软(不能伸长)的链条,在重力的作用下所具有的曲线形状,例如悬索桥等,因其与两端固定的绳子在均匀引力作用下下垂相似而得名。适当选择坐标系后,悬链线的方程是一个双曲余弦函数,其标准方程为:y=a cosh(x/a),其中,a为曲线顶点到横坐标轴的距离。

 

等高悬链线

 

标准方程

悬链线

其中,a为常数,是曲线顶点到横坐标轴的距离。 [

悬链线

function curve_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject    handle to figure
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
% varargin   command line arguments to curve (see VARARGIN)
x = linspace(-5, 5, 100);
a = 0.61803;
A = 10*a;
y = A*cosh(x/a);
plot(x, y, 'color', 'black');
% Choose default command line output for curve
handles.output = hObject;

% Update handles structure
guidata(hObject, handles);

% UIWAIT makes curve wait for user response (see UIRESUME)
% uiwait(handles.figure1);


% --- Outputs from this function are returned to the command line.
function varargout = curve_OutputFcn(hObject, eventdata, handles) 
% varargout  cell array for returning output args (see VARARGOUT);
% hObject    handle to figure
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Get default command line output from handles structure
varargout{1} = handles.output;


% --- Executes on slider movement.
function slider1_Callback(hObject, eventdata, handles)
% hObject    handle to slider1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'Value') returns position of slider
%        get(hObject,'Min') and get(hObject,'Max') to determine range of slider
change_a = get(hObject,'Value') ;
 plotCurve(change_a, exp(1) );

% --- Executes during object creation, after setting all properties.
function slider1_CreateFcn(hObject, eventdata, handles)
% hObject    handle to slider1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: slider controls usually have a light gray background.
if isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor',[.9 .9 .9]);
end


% --- Executes on slider movement.
function slider2_Callback(hObject, eventdata, handles)
% hObject    handle to slider2 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'Value') returns position of slider
%        get(hObject,'Min') and get(hObject,'Max') to determine range of slider
A = cala(get(hObject,'Value'));
plotCurve(pi, A);

% --- Executes during object creation, after setting all properties.
function slider2_CreateFcn(hObject, eventdata, handles)
% hObject    handle to slider2 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: slider controls usually have a light gray background.
if isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor',[.9 .9 .9]);
end

% --- Executes during object creation, after setting all properties.
function axes2_CreateFcn(hObject, eventdata, handles)
% hObject    handle to axes2 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called
%imshow('Fun.jpg');
% Hint: place code in OpeningFcn to populate axes2

function plotCurve(a, A)
x = linspace(-5, 5, 100);
%a = 0.61803;
%A = 10*a;

y = A*cosh(x/a);
plot(x, y, 'color', 'red');

function A = cala(changA)
A = changA;

在悬索线上放一重物时,求解其与两固定点水平连线的距离的思考

1, 认为线不会因上面挂重物而变长。 直接计算就可以。

2,线会因挂重物而变长,但假定变化长度各占均匀。可以以物体在线的中间计算其变化长度来衡量其它各占的长度。或者多求几个点的求其下平均值。

3, 采用数值计算的方式逼近其变量小于某一阈值则停止,思考为什么收敛?类似神经网络的反馈。

上面三种方法计算的值,通过拟合后可以手工测量的值对比,看精度怎样?

4,没有挂重物时可以通过悬索方程求线的长度。当然也可以测量。

 

 

 

Refs

https://baike.baidu.com/item/%E6%82%AC%E9%93%BE%E7%BA%BF/834767?fr=aladdin

相关文章: