## 148 Reputation

16 years, 195 days

## Wow Thanks!!!...

Wow Thanks!!!  Math is so Cool!!!

Thank!! :-)

## Thanks!!!!  that...

Thanks!!!!  that solved my problem

## That fixed solving for L but...

That fixed solving for L but not for the nstart or nfinal variables.

now

eq1 := 1/L = R*(1/nfinal^2-1/nstart^2)

sol1:= solve(eq1, nstart)

eval(subs(L = 6.561123702*10^(-7), nfinal = 2, R = 0.1097373e8, sol1))

Gives an error "Error, invalid input: subs received ((-nfinal^2+R*L)*R*L)^(1/2)*nfinal/(-nfinal^2+R*L), which is not valid for its 4th argument"

And

eq1 := 1/L = R*(1/nfinal^2-1/nstart^2)

sol1:= solve(eq1, nfinal)

eval(subs(L = 6.561123702*10^(-7), nfstart = 3, R = 0.1097373e8, sol1))

gives an error "Error, invalid input: subs received ((nstart^2+R*L)*R*L)^(1/2)*nstart/(nstart^2+R*L), which is not valid for its 4th argument"

Any ideas what I'm doing wrong....

tia sal22

## Do you know where I can find an example?...

Do you know where I can find an example?  I didn't think pitch/frequency shifting

was that uncommon.....

thanks

## To get previous Fibonacci number I used ...

To get the previous Fibbonacci number when you input a number I used this formula:

(simple aglebra)

phi1:=(1+sqrt(5))/2

13/phi1

I tested it with 13 and got 8.034441857 .....so that works

So how do I go about getting a range of previous fibonacci numbers bewteen 20 and 20000.  I think I can use recursion but how do I get it to just give me the range between 20 and 20000 when given a large number like 29389237984E12

Thanks

sal2

## ok step by step.......

I looked at one of your lessons on the net

http://www.math.ubc.ca/~israel/m210/lesson31b.pdf

Binet's Formula...I think that's what you where trying to get me to use.http://www.math.colostate.edu/~spriggs/m130/fibonacci.pdf

invfib := proc (z) options operator, arrow; ((1/2+(1/2)*sqrt(5))^z-(1/2-(1/2)*sqrt(5))^z)/sqrt(5) end proc

The thing is it wants the fibonacci number placement not the number itself.  Or where you trying to get me to go in another direction?  I'm allways willing to learn something new especially when it comes to fibonacci numbers

Aloha

Rick

## what I meant to say was how can I find t...

what I meant to say was how can I find the previous Fibonacci numbers given one...hope this clarifies things a bit

## Thanks again......

Here are the steps in case someone else may have questions about recursion.

1) I used the listtorec function that Robert Israel showed me how to use:
with(gfun): listtorec([1, 1, 0, 0, 1, 1, 0, 0], a(n));
P := rectoproc(%[1], a(n)); seq(P(n), n = 0 .. 20);

2) I Changed that into a procedure also with help from Robert Israel
binalt := proc (n)
if n = 0 then return 1
elif n = 1 then
return 1
elif n = 2 then
return 0
else
return binalt(n-1)-binalt(n-2)+binalt(n-3)
end if
end proc:
seq(binalt(n), n = 0 .. 10);

3) Then used the proper syntax Jay Pedersen showed me
finaly2 := proc (n::integer)
local k, y, rv;
option remember;
if n <= 1 then
return n
else
y := array(0 .. n, [0, 1]);
for k from 2 to n do
rv := binalt(k);
if rv = 1 then
y[k] := y[k-1]+combinat:-fibonacci(k)
elif rv = 0 then
y[k] := y[k-1]-combinat:-fibonacci(k)
else
y[k] := 0
end if
end do
end if;
return y[n]
end proc:

thanks for the help everybody

## I tried converting the...

I tried converting the work book that didn't work and I tried converting line by line errors with ; and "Not implemented case of Interpolation with 2 arguments"

I get this when I convert the whole notebook at once

Warning, The options, [`Filling -> Axis`], are not translated and are being ignored
Warning, The options, [`Filling -> Axis`], are not translated and are being ignored
Warning, The options, [`PlotStyle -> Red`], are not translated and are being ignored
Warning, overwriting previously existing Maple worksheet "c://del//Fourier Series expansions.mw"

> data := [[0, 14], [1, 18.7], [2, 9], [3, 4.1], [4, 6.7], [5, 6], [6, 6.3], [7, 8.4], [8, 4], [9, 2.9], [10, 14]];

f=Interpolation[data,PeriodicInterpolation->True];

<<"FourierSeries`"

s := `@`(evalf, proc (x) options operator, arrow; FourierTrigSeries(f(x), x, 5, FourierParameters = [-1, 1/10]) end proc);

discr=Interpolation[data/.{x_,y_}->{x+1,y},InterpolationOrder->0];
IndentingNewLine;

g := proc (x) options operator, arrow; Piecewise([[discr(x), 0 < x and x < 10], [0, true]]) end proc;

"";

plots[display](plot(s(x), x = -10 .. 20, view = 0 .. 20), plot(g(x), x = -10 .. 20), plots[listplot](data, style = POINT, symbol = CIRCLE, view = 0 .. 20));
[[0, 14], [1, 18.7], [2, 9], [3, 4.1], [4, 6.7], [5, 6], [6, 6.3], [7, 8.4],

[8, 4], [9, 2.9], [10, 14]]
f = Interpolation[[[0, 14], [1, 18.7], [2, 9], [3, 4.1], [4, 6.7], [5, 6],

[6, 6.3], [7, 8.4], [8, 4], [9, 2.9], [10, 14]],

PeriodicInterpolation -> True]
Error, missing operator or `;`

Even the data numbers don't match up

I guess that mmatranslator is just for basic syntax stuff like adding and subtracting numbers the commands don't come close to even looking like they work.

## Thanks so much for explaining it that he...

Thanks so much for explaining it that helps a lot!!!

## Sorry the paste operation...

Sorry the paste operation left out the '\$' for some reason..

`with(combinat, fibonacci):`

array([[k, fibonacci(k), modp(fibonacci(k)-1, 9)+1] \$ k = 0 .. 4]);

gives you

0,0,9

1,1,10

2,1,10

3,2,11

4,3,12

 Page 1 of 1
﻿