{"id":266113,"date":"2015-09-22T11:32:11","date_gmt":"2015-09-22T07:32:11","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=266113"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=266113","title":{"rendered":"\u0421\u043f\u0435\u043a\u0442\u0440\u0430\u043b\u044c\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0437\u0430\u0434\u0430\u0447 \u043c\u0430\u0442\u0444\u0438\u0437\u0438\u043a\u0438"},"content":{"rendered":"<p>       \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043e\u043f\u0438\u0441\u0430\u043d \u043f\u0441\u0435\u0432\u0434\u043e\u0441\u043f\u0435\u043a\u0442\u0440\u0430\u043b\u044c\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439 \u043c\u0430\u0442\u0444\u0438\u0437\u0438\u043a\u0438, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u0432 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0433\u0438\u0434\u0440\u043e\u0434\u0438\u043d\u0430\u043c\u0438\u043a\u0435, \u0433\u0435\u043e\u0444\u0438\u0437\u0438\u043a\u0435, \u043a\u043b\u0438\u043c\u0430\u0442\u043e\u043b\u043e\u0433\u0438\u0438 \u0438 \u0432\u043e \u043c\u043d\u043e\u0433\u0438\u0445 \u0434\u0440\u0443\u0433\u0438\u0445 \u043e\u0431\u043b\u0430\u0441\u0442\u044f\u0445. <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/041\/694\/9ed\/0416949ed32e42679977b78778effbba.jpg\" alt=\"image\" \/><\/div>\n<p>  <a name=\"habracut\"><\/a>  <\/p>\n<h4>\u041e\u0434\u043d\u043e\u043c\u0435\u0440\u043d\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0442\u0435\u043f\u043b\u0430 \u043f\u043e \u0441\u0442\u0435\u0440\u0436\u043d\u044e<\/h4>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u043e\u0441\u0442\u0443\u044e \u043e\u0434\u043d\u043e\u043c\u0435\u0440\u043d\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0442\u0435\u043f\u043b\u0430 \u0432 \u0441\u0442\u0435\u0440\u0436\u043d\u0435. \u0423\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435, \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0449\u0435\u0435 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0442\u0435\u043f\u043b\u0430 \u043f\u0440\u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u043c \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b \u043f\u043e \u0441\u0442\u0435\u0440\u0436\u043d\u044e:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/d4c\/5a3\/540\/d4c5a35404a04719aef80958acc6af91.png\" alt=\"image\"\/><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/452\/8b9\/3d2\/4528b93d26d249b7b8860e33eabd2cad.png\" alt=\"image\"\/><\/p>\n<p>  \u0422\u0430\u043a\u043e\u0435 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0440\u0435\u0448\u0430\u0435\u0442\u0441\u044f \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <a href=\"http:\/\/de.ifmo.ru\/--books\/0051\/2\/2_1\/21yrteplmetraz_1.htm\">\u0437\u0434\u0435\u0441\u044c<\/a>, \u043d\u043e \u043d\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 \u043a\u0430\u043a \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e. \u041f\u0440\u0435\u0436\u0434\u0435 \u0432\u0441\u0435\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f, \u043a\u0430\u043a \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0432\u0442\u043e\u0440\u0443\u044e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u0443\u044e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u0443\u044e \u043f\u043e \u0445. \u041f\u0440\u043e\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a\u0438\u043c-\u043d\u0438\u0431\u0443\u0434\u044c \u0440\u0430\u0437\u043d\u043e\u0441\u0442\u043d\u044b\u043c \u043c\u0435\u0442\u043e\u0434\u043e\u043c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/dd1\/389\/9d3\/dd13899d346546e39476f4ea6e084703.png\" alt=\"image\"\/><\/p>\n<p>  \u041d\u043e \u043c\u044b \u043f\u043e\u0441\u0442\u0443\u043f\u0438\u043c \u0438\u043d\u0430\u0447\u0435. \u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b \u0435\u0441\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0438 \u0432 \u043a\u0430\u0436\u0434\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u044d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u0432 \u0432\u0438\u0434\u0435 \u0441\u0443\u043c\u043c\u044b \u0440\u044f\u0434\u0430 \u0424\u0443\u0440\u044c\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432 \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u043c \u0432\u0438\u0434\u0435 \u043e\u0431\u0440\u0435\u0437\u0430\u0435\u0442\u0441\u044f \u043d\u0430 n-\u043e\u043c \u0447\u043b\u0435\u043d\u0435:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/ba8\/235\/faf\/ba8235fafc1143a9825d49fb1df77bed.png\" alt=\"image\"\/><\/p>\n<p>  \u0413\u0434\u0435 u^\u00ab\u0441 \u043a\u0440\u044b\u0448\u0435\u0447\u043a\u043e\u0439\u00bb \u2014 \u044d\u0442\u043e \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u044b \u0440\u0430\u0437\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0440\u044f\u0434\u0430 \u0424\u0443\u0440\u044c\u0435. \u041f\u043e\u0434\u0441\u0442\u0430\u0432\u0438\u043c \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0440\u044f\u0434\u0430 \u0432 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0430 \u0442\u0435\u043f\u043b\u0430:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/505\/b42\/6b5\/505b426b529942e1aed9464a244f2d18.png\" alt=\"image\"\/><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/59a\/7d3\/bfd\/59a7d3bfd709474c8ee1c29029e81f9e.png\" alt=\"image\"\/><\/p>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u043e\u0432 \u0424\u0443\u0440\u044c\u0435, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c <b>\u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u0430\u044f \u043f\u043e \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0435!<\/b> \u0422\u0435\u043f\u0435\u0440\u044c \u044d\u0442\u043e \u043e\u0431\u044b\u043a\u043d\u043e\u0432\u0435\u043d\u043d\u043e\u0435 \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0435 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435, \u0430 \u043d\u0435 \u0432 \u0447\u0430\u0441\u0442\u043d\u044b\u0445 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0448\u0438\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0440\u0430\u0437\u043d\u043e\u0441\u0442\u043d\u044b\u043c \u043c\u0435\u0442\u043e\u0434\u043e\u043c. \u0423\u0436\u0435 \u043b\u0435\u0433\u0447\u0435, \u0442\u0435\u043f\u0435\u0440\u044c \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u0439\u0442\u0438 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u044b \u0440\u0430\u0437\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u0432 \u044d\u0442\u043e\u043c \u043d\u0430\u043c \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043c\u043e\u0436\u0435\u0442 <b>\u0431\u044b\u0441\u0442\u0440\u043e\u0435 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0424\u0443\u0440\u044c\u0435<\/b> (\u0434\u0430\u043b\u044c\u0448\u0435 FFT).<\/p>\n<p>  \u041b\u043e\u0433\u0438\u043a\u0430 \u0437\u0434\u0435\u0441\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f:<\/p>\n<p>  1) \u0432 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0434\u0430\u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b, \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b \u043f\u043e \u0441\u0442\u0435\u0440\u0436\u043d\u044e;<br \/>  2) \u0440\u0430\u0437\u0431\u0438\u0432\u0430\u0435\u043c \u0441\u0442\u0435\u0440\u0436\u0435\u043d\u044c \u043d\u0430 \u0441\u0435\u0442\u043a\u0443 \u0438\u0437 n \u0442\u043e\u0447\u0435\u043a;<br \/>  3) \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0441\u043d\u044b\u0435 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u044b \u0424\u0443\u0440\u044c\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 FFT, \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0438\u043c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e \u043a\u0430\u043a F(u);<br \/>  4) \u0443\u043c\u043d\u043e\u0436\u0430\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0435\u043d\u0442\u044b \u043d\u0430 -|k|<sup>2<\/sup>, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c <b>\u0424\u0443\u0440\u044c\u0435-\u043e\u0431\u0440\u0430\u0437 \u0432\u0442\u043e\u0440\u043e\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u043e\u0439. \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0424\u0443\u0440\u044c\u0435-\u043e\u0431\u0440\u0430\u0437 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u043e\u0439 \u0431\u043e\u043b\u0435\u0435 \u0432\u044b\u0441\u043e\u043a\u0438\u0445 \u043f\u043e\u0440\u044f\u0434\u043a\u043e\u0432 p, \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0443\u043c\u043d\u043e\u0436\u0438\u0442\u044c \u043d\u0430 (ik)<sup>p<\/sup><\/b>;<br \/>  5) \u0434\u0435\u043b\u0430\u0435\u043c \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0435 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0424\u0443\u0440\u044c\u0435 F<sup>-1<\/sup>(u), \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 IFFT, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432\u0442\u043e\u0440\u043e\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u043e\u0439 \u0432 \u0442\u043e\u0447\u043a\u0430\u0445 \u043d\u0430 \u0441\u0435\u0442\u043a\u0435;<br \/>  6) \u0434\u0435\u043b\u0430\u0435\u043c \u0448\u0430\u0433 \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0443\u0436\u0435 \u043e\u0431\u044b\u0447\u043d\u043e\u0439 \u0440\u0430\u0437\u043d\u043e\u0441\u0442\u043d\u043e\u0439, \u044f\u0432\u043d\u043e\u0439 \u0438\u043b\u0438 \u043d\u0435\u044f\u0432\u043d\u043e\u0439, \u0441\u0445\u0435\u043c\u043e\u0439;<br \/>  7) \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u043c.<\/p>\n<p>  \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0442\u0435\u043f\u0435\u0440\u044c \u043a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 \u0434\u043b\u044f Matlab\/Octave. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b \u0432\u043e\u0437\u044c\u043c\u0435\u043c \u0433\u043b\u0430\u0434\u043a\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e u0=2+sin(x)+sin(2x), \u0441\u0442\u0435\u0440\u0436\u0435\u043d\u044c \u0434\u043b\u0438\u043d\u043d\u043e\u0439 2\u03c0 \u0440\u0430\u0437\u043e\u0431\u044c\u0435\u043c \u043d\u0430 50 \u0442\u043e\u0447\u0435\u043a, \u0441 \u0448\u0430\u0433\u043e\u043c \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 h=0.1, \u0433\u0440\u0430\u043d\u0438\u0447\u043d\u044b\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u043d\u044b\u0435 (\u043a\u043e\u043b\u044c\u0446\u043e). <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434 \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u0433\u043e \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0430 \u0442\u0435\u043f\u043b\u0430<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"matlab\">clear all; n = 50;             % number of points dx = 2*pi\/n;        % space step x = 0:dx:2*pi-dx;   % grid  h = 0.1;            % temporal step times = 10;         % number of iterations in time  k = fftshift(-n\/2:1:n\/2-1); % wave numbers k2 = k.*k;               u0 = 2 + sin(x) + sin(2*x); % initial conditions u = zeros(times,n);         % stores results u(1,:) = u0;  uf = fft(u0);                  % Fourier coefficients of initial function  for i=2:times     uf = uf.*(1-h*k2);      % next time step in Fourier space     u(i,:) = real(ifft(uf));  % IFFT to physical space end  [X,T] = meshgrid(x,0:h:times*h-h); waterfall(X,T,u) <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0421\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 FFT \u0432 Matlab, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u0443\u044e \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u044b \u0440\u0430\u0437\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 d=fft(u) \u0438\u0434\u0443\u0442 \u043d\u0435 \u043f\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0443, \u0430 \u0441\u043c\u0435\u0449\u0435\u043d\u044b, \u043f\u0435\u0440\u0432\u0430\u044f \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0430 \u043d\u0430 \u043c\u0435\u0441\u0442\u0435 \u0432\u0442\u043e\u0440\u043e\u0439 \u0438 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442. C\u043d\u0430\u0447\u0430\u043b\u0430 \u0438\u0434\u0443\u0442 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u044b \u0441 \u043d\u043e\u043c\u0435\u0440\u0430\u043c\u0438 \u043e\u0442 0 \u0434\u043e n\/2-1, \u043f\u043e\u0442\u043e\u043c \u0441 \u043d\u043e\u043c\u0435\u0440\u0430\u043c\u0438 \u043e\u0442 -n\/2 \u0434\u043e -1. \u0421 \u044d\u0442\u0438\u043c \u0431\u044b\u043b\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b\u2026<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/3eb\/824\/392\/3eb82439269b404c8dae81026b71b2ce.png\" alt=\"image\"\/><\/p>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u043d\u043e \u0432\u0438\u0434\u0435\u0442\u044c \u043d\u0430 \u0433\u0440\u0430\u0444\u0438\u043a\u0435 \u0432 \u0432\u0438\u0434\u0435 \u00ab\u0432\u043e\u0434\u043e\u043f\u0430\u0434\u0430\u00bb \u043b\u0438\u043d\u0438\u0439 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b \u043f\u043e \u0445 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 t. \u0412\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0435\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0435, \u0438\u0441\u043f\u044b\u0442\u044b\u0432\u0430\u0435\u0442 \u0441\u0438\u043b\u044c\u043d\u044b\u0435 \u043e\u0441\u0446\u0438\u043b\u044f\u0446\u0438\u0438 (\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u0443\u044e \u043d\u0435\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u044c), \u0441\u0432\u044f\u0437\u0430\u043d\u043e \u044d\u0442\u043e \u0441 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043d\u043e\u0439 \u044f\u0432\u043d\u043e\u0439 \u0441\u0445\u0435\u043c\u043e\u0439 \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u0418\u0437\u0431\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u043e\u0442 \u043e\u0441\u0446\u0438\u043b\u044f\u0446\u0438\u0439 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044f \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u0443\u044e \u043d\u0435\u044f\u0432\u043d\u0443\u044e \u0441\u0445\u0435\u043c\u0443, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <a href=\"https:\/\/en.wikipedia.org\/wiki\/Crank%E2%80%93Nicolson_method\">\u041a\u0440\u0430\u043d\u043a\u0430-\u041d\u0438\u043a\u043e\u043b\u0441\u043e\u043d\u0430<\/a>.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/54e\/2f2\/1ea\/54e2f21ea89542afb8456d631047e5b2.png\" alt=\"image\" \/><\/div>\n<h4>\u0414\u0432\u0443\u043c\u0435\u0440\u043d\u043e\u0435 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0434\u0438\u0444\u0444\u0443\u0437\u0438\u0438<\/h4>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/fc6\/289\/91a\/fc628991ab554a63949170f710f7bc72.png\" alt=\"image\"\/><\/p>\n<p>  \u041d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f: u0 = 1 + sin(2X) + cos(2Y), \u0433\u0434\u0435 u \u0442\u0435\u043f\u0435\u0440\u044c 2d-\u043c\u0430\u0441\u0441\u0438\u0432 u(i,j). \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043d\u0435\u044f\u0432\u043d\u0443\u044e \u0441\u0445\u0435\u043c\u0443 \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 (\u0442.\u0435. \u0432\u044b\u0440\u0430\u0437\u0438\u043c m+1 \u0448\u0430\u0433 \u0447\u0435\u0440\u0435\u0437 m-\u0439):<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/9d2\/0df\/c5d\/9d20dfc5d54f4180a9c3d761b66c3f94.png\" alt=\"image\"\/><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/de0\/2db\/c00\/de02dbc00087488c8d343bc0bf6e6cab.png\" alt=\"image\"\/><\/p>\n<p>  \u041c\u043e\u0436\u043d\u043e \u0434\u043e\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u0442\u0430\u043a\u0430\u044f \u043d\u0435\u044f\u0432\u043d\u0430\u044f \u0441\u0445\u0435\u043c\u0430 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0440\u0430\u0441\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u0440\u0438 \u03b7&gt;0.5, \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u03b7=1. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043a\u0430\u0436\u0434\u043e\u0435 \u043d\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 u<sup>m+1<\/sup> \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435\u043c u<sup>m<\/sup> \u043d\u0430 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u03bc<sub>k<\/sub>, \u0437\u0430\u0432\u0438\u0441\u044f\u0449\u0438\u0439 \u043e\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0433\u043e \u0448\u0430\u0433\u0430 \u0438 \u0432\u043e\u043b\u043d\u043e\u0432\u044b\u0445 \u0447\u0438\u0441\u0435\u043b k, \u0442.\u0435. \u03bc<sub>k<\/sub> \u2014 \u044d\u0442\u043e \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u0448\u0430\u0433\u0435! <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434 \u0434\u043b\u044f \u0434\u0432\u0443\u043c\u0435\u0440\u043d\u043e\u0433\u043e \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0434\u0438\u0444\u0444\u0443\u0437\u0438\u0438<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"matlab\">clear all;  eta = 1; n = 32;              % number of points dx = 2*pi\/n;         % space step x = 0:dx:2*pi-dx;     y = x; [X, Y] = meshgrid(x,y);  h = 0.01;            % temporal step times = 30;         % number of iterations in time  k1 = meshgrid(fftshift(-n\/2:1:n\/2-1),ones(n,1)); k2 = k1'; ks = k1.*k1 + k2.*k2;  mu = (1-(1-eta)*ks^2*h).\/(1+eta*ks.^2*h); % stores multipliers   u0 = 1 + sin(2*X) + sin(2*Y);  % initial temperature u = zeros(times,n,n);        % stores results umin=min(min(u0));  umax=max(max(u0));  u(1,:,:) = u0;  uf = fft2(u0);  for i=2:times     uf = mu.*uf;  % time step     u(i,:,:) = real(ifft2(uf)); end  createGif('diffusion2d.gif',X,Y,u,times,1,[0 2*pi 0 2*pi umin umax]); <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0421\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0433\u0438\u0444\u043a\u0438<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"matlab\">function createGif(name,X,Y,u,times,every,ax) % creates gif movie form 3D array % save results to gif file gifka = name; clf; pic = surf(X,Y,squeeze(u(1,:,:))),axis(ax); for i=1:every:times      set(pic,'zdata',squeeze(u(i,:,:))), drawnow;     M(i) = getframe;     frame = getframe;     im = frame2im(frame);     [imind,cm] = rgb2ind(im,256);     if i == 1;         imwrite(imind,cm,gifka,'gif','Loopcount',inf);     else         imwrite(imind,cm,gifka,'gif','WriteMode','append','DelayTime',.1);     end end end <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/44c\/fa7\/98f\/44cfa798ffbc4e2784931e2c250f4842.gif\" alt=\"image\" \/><\/div>\n<h4>\u0414\u0432\u0443\u043c\u0435\u0440\u043d\u043e\u0435 \u0432\u043e\u043b\u043d\u043e\u0432\u043e\u0435 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435<\/h4>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/8a3\/5a7\/748\/8a35a7748b75425aba6239eb78af595d.png\" alt=\"image\"\/><br \/>  \u0412 \u0432\u043e\u043b\u043d\u043e\u0432\u043e\u043c \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0438 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0432\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u0430\u044f \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0437\u0430\u0434\u0430\u0447\u0430 \u0441\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043a \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0434\u0432\u0443\u0445 \u043e\u0431\u044b\u043a\u043d\u043e\u0432\u0435\u043d\u043d\u044b\u0445 \u0434\u0438\u0444\u0444\u0443\u0440\u043e\u0432, \u043e\u0434\u043d\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u2014 u, \u0432\u0442\u043e\u0440\u0430\u044f \u2014 u<sub>t<\/sub>, \u0441\u0445\u0435\u043c\u0443 \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0432 \u043a\u043e\u0434\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0441\u0430\u043c\u0443\u044e \u043f\u0440\u043e\u0441\u0442\u0443\u044e \u044f\u0432\u043d\u0443\u044e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0430\u044f, \u0448\u0430\u0433 \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043e\u0447\u0435\u043d\u044c \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0439, \u0437\u0430\u0442\u043e \u043a\u043e\u0434 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e. \u0412\u043f\u0440\u043e\u0447\u0435\u043c, \u044d\u0442\u043e\u0433\u043e \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u0434\u043b\u044f \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u043c\u0435\u0442\u043e\u0434\u0430.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434 \u0434\u043b\u044f \u0434\u0432\u0443\u043c\u0435\u0440\u043d\u043e\u0433\u043e \u0432\u043e\u043b\u043d\u043e\u0432\u043e\u0433\u043e \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"matlab\">clear all; a = 1;               % speed of wave propagation n = 64;              % number of points dx = 2*pi\/n;         % space step x = 0:dx:2*pi-dx;     y = x; [X, Y] = meshgrid(x,y);  h = 0.01;            % temporal step times = 1000;         % number of iterations in time  % explanation of this part is here www.staff.uni-oldenburg.de\/hannes.uecker\/pre\/030-mcs-hu.pdf k1 = meshgrid(fftshift(-n\/2:1:n\/2-1),ones(n,1)); k2 = k1'; ks = k1.*k1 + k2.*k2;  u0 = exp(-100*((X-pi).^2 + (Y-pi).^2));  % profile of initial velocity u  ut0 = zeros(n,n);                           % profile of initial acceleration ut  u = zeros(times,n,n);  % stores velocity profile for every time steps u(1,:,:) = u0;  uf = fft2(u0); uft = fft2(ut0);  for i=2:times     uft_new = uft - a*h*ks.*uf;     uf = uf + 0.5*h*(uft+uft_new);     uft = uft_new;          % == fixed boundary conditions  %     u0 = real(ifft2(uf)); %     u0(1,:) = 0; u0(end,:) = 0; %     u0(:,1) = 0; u0(:,end) = 0; %     uf = fft2(u0);     % == fixed boundary conditions          u(i,:,:) = real(ifft2(uf)); end  createGif('wave2d_periodic_bc.gif',X,Y,u,times,10,[0 2*pi 0 2*pi -.2 .2]); <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u041f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u043d\u044b\u0435 \u0433\u0440\u0430\u043d\u0438\u0447\u043d\u044b\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/69d\/883\/0a4\/69d8830a4efa4a21b344a6ca13b2fdc3.gif\" alt=\"image\" \/><\/div>\n<p>  \u0424\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0433\u0440\u0430\u043d\u0438\u0447\u043d\u044b\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f (0 \u043d\u0430 \u043a\u0440\u0430\u044f\u0445, \u043e\u0442\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0432\u043e\u043b\u043d \u043e\u0442 \u0433\u0440\u0430\u043d\u0438\u0446):<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/f5d\/c80\/f4f\/f5dc80f4f50649b180c61cb23ddf4bd8.gif\" alt=\"image\" \/><\/div>\n<p>  <\/p>\n<h4>\u0412\u044b\u0432\u043e\u0434\u044b<\/h4>\n<p>  \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0441\u043f\u0435\u043a\u0442\u0440\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0437\u0430\u0434\u0430\u0447 \u043c\u0430\u0442\u0444\u0438\u0437\u0438\u043a\u0438. \u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0441\u0443\u0442\u044c \u0441\u0443\u0442\u044c \u0441\u043f\u0435\u043a\u0442\u0440\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430, \u044d\u0442\u043e \u0437\u0430\u043c\u0435\u043d\u0430 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0438\u0444\u0444\u0440\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439 \u0432 \u0447\u0430\u0441\u0442\u043d\u044b\u0445 \u043f\u0440\u043e\u0438\u0437\u043e\u0434\u043d\u044b\u0445 \u043d\u0430 \u043e\u0431\u044b\u043a\u043d\u043e\u0432\u0435\u043d\u043d\u044b\u0435 \u0434\u0438\u0444\u0444\u0443\u0440\u044b \u0434\u043b\u044f \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u043e\u0432 \u0440\u0430\u0437\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438\u0441\u043a\u043e\u043c\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043f\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u0431\u0430\u0437\u0438\u0441\u0443. \u0411\u0430\u0437\u0438\u0441\u043e\u043c \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0441\u0438\u043d\u0443\u0441\u044b-\u043a\u043e\u0441\u0438\u043d\u0443\u0441\u044b, \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0441\u043d\u044b\u0435 \u044d\u043a\u0441\u043f\u043e\u043d\u0435\u043d\u0442\u044b, \u043e\u0440\u0442\u043e\u0433\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u043e\u043b\u0438\u043d\u043e\u043c\u044b, \u0435\u0441\u043b\u0438 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u044f \u2014 \u0446\u0438\u043b\u0438\u043d\u0434\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0438\u043b\u0438 \u0441\u0444\u0435\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u041d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0435 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u044b \u0432 \u043a\u0430\u0436\u0434\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0438\u0441\u043a\u043e\u043c\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u0430 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c FFT \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u0431\u044b\u0441\u0442\u0440\u043e.<\/p>\n<p>  \u041f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430\u043c\u0438 \u043c\u0435\u0442\u043e\u0434\u0430 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f:<\/p>\n<ol>\n<li>\u0425\u043e\u0440\u043e\u0448\u0430\u044f \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u0434\u043b\u044f \u00ab\u0445\u043e\u0440\u043e\u0448\u0438\u0445\u00bb \u0444\u0443\u043d\u043a\u0446\u0438\u0439. \u0421 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0442\u043e\u0447\u0435\u043a \u0441\u0435\u0442\u043a\u0438 n \u043e\u0448\u0438\u0431\u043a\u0430 \u043c\u0435\u0442\u043e\u0434\u0430 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0445 \u0440\u0430\u0437\u043d\u043e\u0441\u0442\u0435\u0439 \u043f\u0430\u0434\u0430\u0435\u0442 \u043a\u0430\u043a O(N<sup>-m<\/sup>)) (\u0433\u0434\u0435 m \u2014 \u043d\u0435\u043a\u0430\u044f \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u0430\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u043c\u0435\u0442\u043e\u0434\u0430 \u0438 \u0433\u043b\u0430\u0434\u043a\u043e\u0441\u0442\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438), \u0430 \u0434\u043b\u044f \u0441\u043f\u0435\u043a\u0442\u0440\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u044d\u043a\u0441\u043f\u043e\u043d\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 O(c<sup>N<\/sup>), \u0433\u0434\u0435 0 &lt; c &lt; 1.<\/li>\n<li>\u041e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043f\u0440\u0438 \u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u044b\u0445 \u0432\u044b\u0441\u043e\u043a\u0438\u0445 \u0441\u0442\u0435\u043f\u0435\u043d\u0435\u0439, \u0434\u043b\u044f \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u043c\u0435\u0442\u043e\u0434 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0445 \u0440\u0430\u0437\u043d\u043e\u0441\u0442\u0435\u0439 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u0444\u043e\u0440\u043c\u0443\u043b. \u041f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 FFT \u0434\u0430\u0435\u0442 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c O(N log(N)), \u0447\u0442\u043e \u043f\u0440\u0438\u0435\u043c\u043b\u0435\u043c\u043e \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0437\u0430\u0434\u0430\u0447<\/li>\n<li>\u0421\u043f\u0435\u043a\u0442\u0440\u0430\u043b\u044c\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u0435\u043d \u0432 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0438 \u043f\u0430\u043c\u044f\u0442\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0448\u0438\u0440\u043e\u043a\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u0433\u0435\u043e\u0444\u0438\u0437\u0438\u043a\u0435, \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u043a\u043b\u0438\u043c\u0430\u0442\u0430 \u0438 \u043c\u0435\u0442\u0435\u043e\u0440\u043e\u043b\u043e\u0433\u0438\u0438. <\/li>\n<\/ol>\n<p>  \u041d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0438 \u0442\u043e\u0436\u0435 \u0438\u043c\u0435\u044e\u0442\u0441\u044f:<\/p>\n<ol>\n<li><a href=\"https:\/\/en.wikipedia.org\/wiki\/Gibbs_phenomenon\">\u0424\u0435\u043d\u043e\u043c\u0435\u043d \u0413\u0438\u0431\u0431\u0441\u0430<\/a>, \u043e\u0447\u0435\u043d\u044c \u043d\u0435\u0445\u043e\u0440\u043e\u0448\u0435\u0435 \u044f\u0432\u043b\u0435\u043d\u0438\u0435, \u0441\u0438\u043b\u044c\u043d\u043e \u0432\u043b\u0438\u044f\u044e\u0449\u0435\u0435 \u043d\u0430 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u043d\u0430 \u043a\u0440\u0430\u044f\u0445 \u043e\u0431\u043b\u0430\u0441\u0442\u0438<\/li>\n<li>\u0411\u043e\u043b\u0435\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043d \u043a \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c \u043d\u0430 \u0441\u0442\u0435\u043f\u0435\u043d\u044c \u0441\u0432\u043e\u0431\u043e\u0434\u044b, \u0447\u0435\u043c \u0432 \u0440\u0430\u0437\u043d\u043e\u0441\u0442\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u0430\u0445<\/li>\n<li>\u041f\u043b\u043e\u0445\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c \u043a \u0437\u0430\u0434\u0430\u0447\u0430\u043c \u0441 \u043d\u0435\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0435\u0439, \u0438 \u0433\u0440\u0430\u043d\u0438\u0447\u043d\u044b\u043c \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u043c, \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u043c \u043e\u0442 \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u0438\u0445.<\/li>\n<\/ol>\n<p>  \u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u043c\u043e\u044f \u043f\u0435\u0440\u0432\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u0431\u0443\u0434\u0435\u0442 \u043a\u043e\u043c\u0443-\u043d\u0438\u0431\u0443\u0434\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u0430, \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u044d\u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0439 \u0441\u0442\u0430\u0440\u0442 \u0434\u043b\u044f \u0438\u0437\u0443\u0447\u0430\u044e\u0449\u0438\u0445 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437\u0434\u0435\u043b \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432. \u0416\u0434\u0443 \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u0439 \u043a <a href=\"https:\/\/github.com\/DanmerZ\/spectralhabr\">\u043a\u043e\u0434\u0443<\/a>, \u043e\u0444\u043e\u0440\u043c\u043b\u0435\u043d\u0438\u044e \u0438 \u0441\u043e\u0432\u0435\u0442\u043e\u0432! <\/p>\n<h4>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b\u0435 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0438<\/h4>\n<p>  <\/p>\n<ol>\n<li>\u041e\u0442\u043b\u0438\u0447\u043d\u044b\u0439 \u043e\u0431\u0437\u043e\u0440 \u043e\u0442 <a href=\"http:\/\/www.staff.uni-oldenburg.de\/hannes.uecker\/pre\/030-mcs-hu.pdf\">Hannes Uecker<\/a> \u0441 <a href=\"http:\/\/www.staff.uni-oldenburg.de\/hannes.uecker\/soft.html\">\u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438 \u043a\u043e\u0434\u0430<\/a>, \u0447\u0430\u0441\u0442\u044c \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435<\/li>\n<li>\u041d\u0435\u0431\u043e\u043b\u044c\u0448\u0430\u044f, \u0438 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043a\u043d\u0438\u0433\u0430 Lloyd N. Trefethen, <a href=\"https:\/\/people.maths.ox.ac.uk\/trefethen\/spectral.html\">Spectral Methods in MATLAB<\/a><\/li>\n<li>\u0424\u0443\u043d\u0434\u0430\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u0430\u044f \u043a\u043d\u0438\u0433\u0430 John P.Boyd <a href=\"https:\/\/books.google.ru\/books\/about\/Chebyshev_and_Fourier_Spectral_Methods.html?id=lEWnQWyzLQYC&amp;redir_esc=y\">\u00abChebyshev and Fourier Spectral Methods\u00bb<\/a><\/li>\n<\/ol>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/267401\/\"> http:\/\/habrahabr.ru\/post\/267401\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043e\u043f\u0438\u0441\u0430\u043d \u043f\u0441\u0435\u0432\u0434\u043e\u0441\u043f\u0435\u043a\u0442\u0440\u0430\u043b\u044c\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439 \u043c\u0430\u0442\u0444\u0438\u0437\u0438\u043a\u0438, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u0432 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0433\u0438\u0434\u0440\u043e\u0434\u0438\u043d\u0430\u043c\u0438\u043a\u0435, \u0433\u0435\u043e\u0444\u0438\u0437\u0438\u043a\u0435, \u043a\u043b\u0438\u043c\u0430\u0442\u043e\u043b\u043e\u0433\u0438\u0438 \u0438 \u0432\u043e \u043c\u043d\u043e\u0433\u0438\u0445 \u0434\u0440\u0443\u0433\u0438\u0445 \u043e\u0431\u043b\u0430\u0441\u0442\u044f\u0445. <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/041\/694\/9ed\/0416949ed32e42679977b78778effbba.jpg\" alt=\"image\" \/><\/div>\n<p>  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-266113","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/266113","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=266113"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/266113\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=266113"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=266113"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=266113"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}