## This is a minimisation problem where I get input from the user for W, lb and lc. And find the minimum value of T for minimum of D. T is given by the relationship as seen in the program. I keep on getting error on that. Thanks for any help.

### Suman Koirala (view profile)

on 20 Feb 2013

L c

D

W

L b

```Problem: A cable of length L c supports a beam of length L b so that it is horizontal when
```
```the weight W is attached to the beam end. The tension force T in the cable is given by the
```
```following equation:
T 
```
```L bL c W
D L 2D 2
c
```
```Where D is the distance of the cable attachment point to the beam pivot.
```
```Create an M-file that:
```
```a) Prompts for and accepts the following inputs from the Command Window : W, L b, and
```
```L c (the weight is in Newtons, and the lengths are in meters), then uses these values to
```
```compute and display in the Command Window the value of D that minimizes the
```
```tension, T , (do not use a loop in your M-file to perform this computation).
```
```b) Your M-file should also display the minimum tension value in the Command Window,
```
```and produce a well annotated graph of T versus D.
```
```c) Lastly, explain in a comment section at the bottom of your M-file how much the value
```
```of D can vary from it’s optimal value before the tension increases by more than 10%
```
```from it’s minimum.
```

## Products

No products are associated with this question.

### Alan Weiss (view profile)

on 20 Feb 2013

This sounds like a transcription of a homework problem. We generally don't like to simply solve people's homework for them.

If you want help, show people what you have done, and where your program throws an error.

Alan Weiss

MATLAB mathematical toolbox documentation

#### Join the 15-year community celebration.

Play games and win prizes!

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi