Calcualting the tension in a wire

9 views (last 30 days)
matt
matt on 15 Mar 2014
Answered: Roger Stafford on 15 Mar 2014
close all; clear all; clc
%Calculates tension in a cable
m=50; g=9.81; l=50; %Parameters are fixed for run
c=linspace(50,100,100);
d=linspace(0,l,100); %Vector for distance from wall
D=zeros(100,1);
Tmin=zeros(100,1);
for x=1:length(c);
tension=m*g*c(x)*l./(d.*sqrt(c(x)^2 - d.^2)); %Calculation
[a,b]=min(tension);
Tmin(x)=a;
D(x)=d(b);
end
plot(D,Tmin,'b') %Plot
[p,q]=min(Tmin); %To find minimum tension, and postn
output=['Minimum tension ', num2str(p), ' occurs at d=', num2str(D(q)), ' Cable length ', num2str(c(q))];
disp(output)
Above is my code for calclulating the tension in a wire (different lengths). The resultant plot is similar to a staircase going downwards, but i am led to believe that it should be more parabolic...could anyone shed any light on the situation, thank you.
EDIT:
m=mass g=gravity l=length of beam c=length of cable Tmin=minimum tension a,b = minimum tension, a, at location, b.
  6 Comments
matt
matt on 15 Mar 2014
I dont have anything to work with, all i have been told is that i am to find the cable length, its position, and the distance from the wall.
matt
matt on 15 Mar 2014
I am asked to plot graphs of: cable length against minimum tension and position d.

Sign in to comment.

Answers (1)

Roger Stafford
Roger Stafford on 15 Mar 2014
The "staircase" effect you are getting is due to the fact that your minimum always occurs at the far end where d = 1, since the tension is always monotone decreasing for the d values you are using. Consequently you get a vertical line for the plot. You are very far from reaching the true minimum at d = c/sqrt(2). If you did have d ranging that far, you would get a hyperbolic, not parabolic, curve of minimum tension versus d.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!