|Subject:||Re: Solving 2 nonlinear equations and using symbolic package error: structure has no member 'alpha'|
|Date:||Sun, 23 Jul 2017 16:02:09 -0400|
On Sun, Jul 23, 2017 at 2:12 PM, RT <address@hidden> wrote:pkg load symbolic
syms alpha A B
sol = solve( f0==A+B*(1-exp(-alpha*t0)), f1==A+B*(1-exp(-alpha*t1)),alp
ha, A, B)
cc=double(sol.alpha)I get and error "error: structure has no member 'alpha'" and I'm not sure why.I'm working a problem to see if I can solve it using Octave the problem I'm working is below:
The general formula for the exponential rise in frequency is given by
f = A + B(1 − exp(−αt))
We need to solve for the values of A , B and α . Let's assume you want an initial frequency of
20 at time t = 0 , and an asymptotic frequency of 200 Hz at time t = ∞ .
Substituting t = 0 and f = 20 into the above equation we find A = 20. If we substitute
t = ∞ and f = 200 we find that B = 180 .
For α you really have a free choice - it controls how fast the frequency rises. If you have another control point say at time t = 2 we want the
frequency to be at 95 of the final frequency i.e. f = .95 × 200 = 190 then we can substitute
these into the above equation (Since we know what A , and B are).
190 = 20 + 180(1 − exp(−2α))
Solving gives α = −0.5 ln(10/180) choose a larger value of α . If you want a faster rise then you'll need to = −1.445
To find the _expression_ for phase we simply integrate with respect to time to give
φ = 2π (At + Bt +(B/α)*exp(−αt))Thanksas you say for alpha you have a free choice so the symbolic pkg leaves it as a free choiceB = (sym)2⋅α180⋅ℯ────────2⋅αℯ - 1therefore you can't print this out as a double.
|[Prev in Thread]||Current Thread||[Next in Thread]|