{"id":518,"date":"2012-04-19T13:40:27","date_gmt":"2012-04-19T13:40:27","guid":{"rendered":"http:\/\/azfreeos.wordpress.com\/?p=1"},"modified":"2013-09-27T15:01:52","modified_gmt":"2013-09-27T15:01:52","slug":"hello-world-3","status":"publish","type":"post","link":"https:\/\/dosen.unila.ac.id\/ahmadzakaria\/2012\/04\/19\/hello-world-3\/","title":{"rendered":"Generate movie using Matlab ver 5.3.1"},"content":{"rendered":"<h3><\/h3>\n<div>\n<div>Surface wave propagation simulation movie, the movement of the bullet, and so on can be created by using a variety of softwares and a variety of ways. One of them is as will be explained here.<\/div>\n<\/div>\n<div>\n<div>We can make movie simulation using Matlab program. Here matlab version 5.3.1 is used (old version).\u00a0For Matlab version 6.0 upwards toolbox function to make the movie we can download it directly from\u00a0Matlab (http:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/309).<\/div>\n<\/div>\n<div>\n<div><a name=\"more\"><\/a><\/div>\n<\/div>\n<div>\n<div>Before making the movie, surely we must have the matlab software version 5.3.1. It is should be already installed in\u00a0our computer.<\/div>\n<\/div>\n<div><\/div>\n<div>\n<div>If the matlab is already installed, we can download the mpgwrite files or download the files from here.\u00a0This file should be unzipped first. After unzip, folder &#8220;mpgwrite&#8221; should be put in the directory\u00a0&#8220;C:MATLABR11toolboxmatlab&#8221;<\/div>\n<\/div>\n<div><\/div>\n<div>\n<div>See the following image,<\/div>\n<div><\/div>\n<\/div>\n<div><\/div>\n<div><a href=\"https:\/\/dosen.unila.ac.id\/wp-content\/uploads\/sites\/21\/2012\/04\/mpgwrite.png\"><img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter\" alt=\"\" src=\"https:\/\/dosen.unila.ac.id\/wp-content\/uploads\/sites\/21\/2012\/04\/mpgwrite.png?w=300\" width=\"320\" height=\"179\" border=\"0\" \/><\/a><\/div>\n<div style=\"text-align: center\">Figure 1. put the folder mpgwrite.<\/div>\n<div><\/div>\n<div>\n<div>\n<div><\/div>\n<div>The next step, we add the path via the Path Browser to the address of the folder above so that the path\u00a0of this being,<\/div>\n<\/div>\n<div><\/div>\n<div>\n<div>&#8220;C:MATLABR11toolboxmatlabmpgwrite&#8221;<\/div>\n<\/div>\n<div><\/div>\n<div>\n<div>&#8220;C:MATLABR11toolboxmatlabmpgwritesrc&#8221;<\/div>\n<\/div>\n<div><\/div>\n<div>\n<div>as well as folders which we will use to run the program Matlab. See Figure 2 below,<\/div>\n<div><\/div>\n<\/div>\n<div><\/div>\n<div><a href=\"http:\/\/azfreeos.files.wordpress.com\/2012\/04\/addpath.png\"><img decoding=\"async\" class=\"aligncenter\" alt=\"\" src=\"http:\/\/azfreeos.files.wordpress.com\/2012\/04\/addpath.png?w=300\" width=\"320\" height=\"179\" border=\"0\" \/><\/a><\/div>\n<div style=\"text-align: center\">Figure 2. Add the path to the folder &#8220;mpgwrite&#8221; and &#8220;mpgwritesrc&#8221;<\/div>\n<div><\/div>\n<div><\/div>\n<div>\n<div>\n<div>After all we add, the next path we &#8220;save&#8221; so that when we close the matlab program, the path is still\u00a0preserved. See Figure 3 below,<\/div>\n<\/div>\n<div><\/div>\n<\/div>\n<div><\/div>\n<div><a href=\"http:\/\/azfreeos.files.wordpress.com\/2012\/04\/savepath.png\"><img decoding=\"async\" class=\"aligncenter\" alt=\"\" src=\"http:\/\/azfreeos.files.wordpress.com\/2012\/04\/savepath.png?w=300\" width=\"320\" height=\"179\" border=\"0\" \/><\/a><\/div>\n<div style=\"text-align: center\">Figure 3. Save the path already created<\/div>\n<div>\n<div><\/div>\n<div>\n<div>\n<div><\/div>\n<div>For example, matlab script can be downloaded <a href=\"https:\/\/dosen.unila.ac.id\/wp-content\/uploads\/sites\/21\/2013\/09\/hyperbola_2d.zip\" target=\"_blank\">from here<\/a>.\u00a0Next we can run the program matlab 5.3.1 where already installed in the machine.\u00a0The next step, we run the file as follows,<\/div>\n<\/div>\n<div><\/div>\n<div><\/div>\n<div>\n<div>&gt;&gt; wav2d (&#8216; f &#8216;, f &#8216;,-1,1, jet, &#8216; test. out &#8216;, &#8216; test &#8216;, &#8216; test. mpeg &#8216;, &#8216; hyperbola &#8216;)<\/div>\n<\/div>\n<div><\/div>\n<div><\/div>\n<div>\n<div>For details see Figure 4 below,<\/div>\n<div><\/div>\n<div><\/div>\n<\/div>\n<div><\/div>\n<div><a href=\"http:\/\/azfreeos.files.wordpress.com\/2012\/04\/paste_function.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" alt=\"\" src=\"http:\/\/azfreeos.files.wordpress.com\/2012\/04\/paste_function.png?w=300\" width=\"320\" height=\"179\" border=\"0\" \/><\/a><\/div>\n<div style=\"text-align: center\">Figure 4. call a script function wav2d.<\/div>\n<div><\/div>\n<div><\/div>\n<div>This Script will read the data file. &#8220;test out&#8221; and save the image into a series of images that are then\u00a0saved into files movie that mpeg files &#8220;test.&#8221;. See Figure 5 below,<\/div>\n<div><\/div>\n<div><\/div>\n<div><a href=\"http:\/\/azfreeos.files.wordpress.com\/2012\/04\/buat_movie.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" alt=\"\" src=\"http:\/\/azfreeos.files.wordpress.com\/2012\/04\/buat_movie.png?w=300\" width=\"320\" height=\"179\" border=\"0\" \/><\/a><\/div>\n<div style=\"text-align: center\">Figure 5. The results shown after matlab script is executed.<\/div>\n<div>\n<div><\/div>\n<div>\n<div>\n<div><\/div>\n<div>Good luck.<\/div>\n<\/div>\n<div>\n<div>For more information, if the script matlab still could produce the file path and the movie, you can\u00a0contact ahmadzakaria@unila.ac.id.<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Surface wave propagation simulation movie, the movement of the bullet, and so on can be created by using a variety of softwares and a variety of ways. One of them &hellip; <a class=\"readmore\" href=\"https:\/\/dosen.unila.ac.id\/ahmadzakaria\/2012\/04\/19\/hello-world-3\/\">Continue Reading &rarr;<\/a><\/p>\n","protected":false},"author":21,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22],"tags":[],"class_list":["post-518","post","type-post","status-publish","format-standard","hentry","category-matlab"],"_links":{"self":[{"href":"https:\/\/dosen.unila.ac.id\/ahmadzakaria\/wp-json\/wp\/v2\/posts\/518"}],"collection":[{"href":"https:\/\/dosen.unila.ac.id\/ahmadzakaria\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dosen.unila.ac.id\/ahmadzakaria\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dosen.unila.ac.id\/ahmadzakaria\/wp-json\/wp\/v2\/users\/21"}],"replies":[{"embeddable":true,"href":"https:\/\/dosen.unila.ac.id\/ahmadzakaria\/wp-json\/wp\/v2\/comments?post=518"}],"version-history":[{"count":0,"href":"https:\/\/dosen.unila.ac.id\/ahmadzakaria\/wp-json\/wp\/v2\/posts\/518\/revisions"}],"wp:attachment":[{"href":"https:\/\/dosen.unila.ac.id\/ahmadzakaria\/wp-json\/wp\/v2\/media?parent=518"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dosen.unila.ac.id\/ahmadzakaria\/wp-json\/wp\/v2\/categories?post=518"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dosen.unila.ac.id\/ahmadzakaria\/wp-json\/wp\/v2\/tags?post=518"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}