- #1

- 1,196

- 0

2 pi f = sqrt( (m g L)/I )

were I is the inertia not imaginary number

but when I try to get MATLAB to solve this equation for L it returns it as a lower case i because it thinks it's the imaginary number

How do I get around this

example

Code:

```
disp('If a pendulum on Earth has a mass of 10 kg, a frequency of .2 Hz, and a inertia of 60 kg m/s,')
fprintf('then it''s legnth is %s m.\n',char(solve(subs('2*pi*f=((m*g*L)/I)^(1/2)',{'f' 'g' 'I' 'm'},{.2 9.8 60 10}),'L')))
If a pendulum on Earth has a mass of 10 kg, a frequency of .2 Hz, and a inertia of 60 kg m/s,
then it's legnth is (2*pi^2*sqrt(-1))/1225 m.
```