x^N-1000*x+999=0
No wonder Matlab wouldn't get a right solution... with the approximation x=1+e, e is found to be 2*(1000-N)/N(N-1), which is close to 0 when N is close to 1000 (the values I was most ly interested for. Bad choice of parameters :-)
This equation arises as a solution to a very simple problem: Suppose you have an interval [a,b] and you need to create a sample grid of N points (i.e. , choose N points between a and b). BUT, I don't want a linear grid but a logarithmic instead, because I want my grid points to be concentrated around some value between a and b. My first choice was OK, let's chose an initial interval dz, and the next interval will be x*dz, the next one x^2*dz etc (x>1), until the sum of all these segments sums up to L=b-a=1. Then for a given dz (in my case dz=0.001) x is found to be the solution of the above polynomial.
Anyways this geometric progression doesn't do it: The value of x is so close to 1 that the intervals are almost linearly changing. Logarithmic (logspace in Matlab) doesn't do it either: In order to achieve the necessary accuracy and resolution I have to have millions of points. So I ended up writing my own logarithmic function, which goes like dz(i)=10^((x^i-1)*dz), for i=1..N and I played around with dz and x in order to get a nice result. Now I believe I have something, I put in my code and soon enough I will know how good it is or not.
Tuesday, November 15, 2005
Categories
- Apple (41)
- Art (2)
- Astronomy (2)
- Books (1)
- Conferences (35)
- cool (30)
- Explanations (1)
- Favorites (39)
- Flight Blogs (8)
- food (4)
- geeky (71)
- Greece (19)
- greeks (20)
- hdr (6)
- hdr london (1)
- internet (2)
- iPhone (3)
- kids (2)
- Las Vegas (11)
- life (143)
- London (22)
- Los Angeles (40)
- Lost (37)
- matlab (1)
- Maui (5)
- Miami and The Bahamas (11)
- Movies (109)
- nature (1)
- New York (39)
- New York Guide (10)
- phd (14)
- Photography (2)
- Physics (1)
- Plasma Road Trip (10)
- Podcast (6)
- science (39)
- shows (17)
- TED (4)
- trips (102)
- United Kingdom (5)
- USA (7)
- usc (3)
- Vista (9)
- weather (1)
- wedding (3)
- ΕΜΠ (1)