# MATLAB

#### Mazaag

Joined Oct 23, 2004
255
Hi Guys,

I'm making a Electronic Musical Keyboard, using a very basic Astable Circuit to generate a square wave. In order to get the different frequencies ( corresponding to different notes ) I need different values of resistors and capacitors etc.

What I want to do is , create an M-file in matlab, that stores the formula for the Time Period in terms parameters R1 , R2 , R3 & C . I want to be able to input values for say any 4 of the parameters ( including T ) , and sovle for the unknown. However, i don't want to do the algebra of hard coding all the equations isolating the parameters .

Is there a function ( similar to the SOLVE function in Mathematica ) in Matlab which can do that for me ? I have the symbolic toolbox, however I have no idea how to get through this problem.

Thanks Guys

#### Mazaag

Joined Oct 23, 2004
255
Originally posted by Mazaag@Mar 23 2006, 11:34 AM
Hi Guys,

I'm making a Electronic Musical Keyboard, using a very basic Astable Circuit to generate a square wave. In order to get the different frequencies ( corresponding to different notes ) I need different values of resistors and capacitors etc.

What I want to do is , create an M-file in matlab, that stores the formula for the Time Period in terms parameters R1 , R2 , R3 & C . I want to be able to input values for say any 4 of the parameters ( including T ) , and sovle for the unknown. However, i don't want to do the algebra of hard coding all the equations isolating the parameters .

Is there a function ( similar to the SOLVE function in Mathematica ) in Matlab which can do that for me ? I have the symbolic toolbox, however I have no idea how to get through this problem.

Thanks Guys
[post=15343]Quoted post[/post]​

Here's the equation for the Time period

Timeperiod = - 2 τ ln((Lh + Vhigh)/(Lh - Vlow))

where τ = R3*C
Vhigh = (Lh*R1)/(R1+R2)
Vlow = (Ll*R1)/(R1+R2)