Exponenciális interpolálás 3 ponton

Unknown magic content: 'mathml'

Egy zenei fórumon a következő problémába futottam: valaki exponenciálisan szeretne paramétereket skálázni. Ez azt jelenti, hogy van egy $[x_\min, x_\max]$ intervallum, amit exponenciálisan le szeretne képezni egy $[y_\min, y_\max]$ intervallumra. A feltétel, amit előírt, hogy van egy bizonyos $x_\mathrm{avg}$ szám, aminek a képe az $y_\mathrm{avg}$ számnak kell, hogy legyen (az eddig megadott hat valós szám tehát előre ismert paraméter).

Ebből kéne kitalálni, hogy melyik az az $y = a \mathrm{exp}\left(bx\right) + c$ alakú függvény, ami az egyik intervallumot a másikra képezi.

Elsőre látszik, hogy itt a kulcs a $b$ paraméter meghatározása lesz. Ha ugyanis $b$ ismert, akkor $a$ és $c$ meghatározása visszavezetődik egy lineáris egyenletrendszer megoldására, a következő módon:

$a = \frac{y_\min - y_\mathrm{avg}}{\mathrm{exp}\left(bx_\min\right) - \mathrm{exp}\left(bx_\mathrm{avg}\right)}$

$c = y_\min - a \mathrm{exp}\left(bx_\min\right)$

A probléma tehát tényleg a $b$ paraméter megadásán múlik.

Ha az ember kellően sokat ügyeskedik, akkor a fenti kifejezések visszahelyettesítésével végül a következő egyenletig jut el:

$\frac{\gamma^{\alpha-1} - 1}{\gamma^{\beta-1} - 1} = \frac{y_\min - y_\mathrm{avg}}{y_\max - y_\min}$,

ahol $\alpha = \frac{x_\mathrm{avg}}{x_\min}$ , $\beta = \frac{x_\max}{x_\min}$ és $\gamma = \mathrm{exp}\left(bx^\min\right)$. Vagyis, ha sikerülne a fenti egyenletből $\gamma$-t meghatározni, akkor kész is vagyunk.

És ez az a pont, ahol elakadtam...

Tagek:
 
Utoljára módosította SAdam 2012.VIII.28 17:02-n; 9 hozzászólás
Bejegyzés módosítása | PermaLink
Szavazás letiltva.

Team Fortress 2 LAN-ban

Ezt a linket elteszem az utókor számára, ha még egyszer találkoznánk ezzel a problémával:

http://gaming.stackexchange.com/questions/26664/how-can-my-friend-and-i-play-tf2-against-bots

A lényeg:

Here is an instruction on how to create a server and put bots on it:

  1. Make sure you have the port 27015 accessible for connections.
  2. Open the game console. (Options⇨Keyboard⇨Advanced...⇨Enable developer console. Press ~ / ` to open the console at any time.)
  3. Type sv_lan 0 if you want the game to be public, or sv_lan 1 for LAN only.
  4. Type map <mapname>, replacing <mapname> with the name of the map you want to play. Or press the [+] to the right of BROWSE SERVERS in main menu instead.
  5. If the server is public and you don't want anyone to intrude, you can set a password: Type sv_password <pass>, replacing <pass> with some simple password. (e.g. sv_password 1234)
  6. Set the bot difficulty: tf_bot_difficulty <x>, where <x> is from 0 (the easiest) to 3.
  7. Add bots: tf_bot_add <team> <class> (<team>: red | blue; <class>: scout | soldier | pyro | demoman | heavyweapons | engineer | medic | sniper | spy.) To remove all bots: tf_bot_kick all

Here are some ways for your friend to connect. If one fails, try the next one.

  • Join the game via Steam. (In Steam Friends list press ▼ and Join Game. In console: connect <ip>:27015, where <ip> is your (server's) IP address, e.g. connect 11.22.33.44:27015)
  • Try the same thing with your (server's) local IP address (find it in Windows/Linux)

If nothing works, see the step 1 of server creation instruction.

Tagek:
 
Utoljára módosította SAdam 2012.VIII.18 20:42-n; 0 hozzászólás
Bejegyzés módosítása | PermaLink
Szavazás letiltva.