MATLAB

Discussion in 'Programmer's Corner' started by Mazaag, Mar 23, 2006.

  1. Mazaag

    Thread Starter Senior Member

    Oct 23, 2004
    255
    0
    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
     
  2. Mazaag

    Thread Starter Senior Member

    Oct 23, 2004
    255
    0

    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)
     
Loading...