This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# PMX 2.0 file format # | |
This is a description of the PMX file format. This is used for 3D models in Miku Miku Dance (MMD). | |
Since I couldn't find any English descriptions of the PMX file format, I've made this, which is translated from http://gulshan-i-raz.geo.jp/labs/2012/10/17/pmx-format1/. I haven't used this file format yet, so please don't ask me what everything means. | |
An English guide to the PMD file format, which preceeded PMX, can be found here: http://mikumikudance.wikia.com/wiki/MMD:Polygon_Model_Data. | |
If you want to learn more, there are some open source projects on GitHub which can read this format, so go take a look at them. | |
Note: fields with type text begins with an int (32 bit) with how many bytes of text the section is. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function levinson(R,L) | |
a = zeros(L,L) | |
P = zeros(1,L) | |
# for m = 1 | |
a[1,1] = -R[2]/R[1] | |
P[1] = R[1]*(1-a[1,1]^2) | |
# for m = 2,3,4,..L | |
for m = 2:L |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function arcov(x,L) | |
N = length(x) | |
phi = zeros(L+1,L+1) | |
for k = 0:L, i=0:L, n=L:N-1 | |
phi[k+1,i+1] += x[n+1-k]*x[n+1-i] | |
end | |
phi = phi./(N-L) | |
a = phi[2:end,2:end]\-phi[2:end,1] | |
P = phi[1,1] + phi[1,2:end]*a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function armcov(x,L) | |
N = length(x) | |
phi = zeros(L+1,L+1) | |
for k = 0:L, i=0:L, n=0:N-L-1 | |
phi[k+1,i+1] += x[n+1+k]*x[n+1+i] + x[n+1+L-k]*x[n+1+L-i] | |
end | |
phi = phi./(2*(N-L)) | |
a = phi[2:end,2:end]\-phi[2:end,1] | |
P = phi[1,1] + phi[1,2:end]*a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function arburg(x,p) | |
N = length(x) | |
P = zeros(1,p+1) | |
f = zeros(p+1,N) | |
b = zeros(p+1,N) | |
a = zeros(p,p) | |
# Initialisation | |
f[1,:] = x |