{"id":524,"date":"2017-09-14T13:17:50","date_gmt":"2017-09-14T16:17:50","guid":{"rendered":"http:\/\/www.professores.uff.br\/diomarcesarlobao\/?page_id=524"},"modified":"2017-09-14T13:17:50","modified_gmt":"2017-09-14T16:17:50","slug":"odeeuler-m","status":"publish","type":"page","link":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/odeeuler-m\/","title":{"rendered":"odeeuler.m"},"content":{"rendered":"<pre>function [t,y] = odeeuler(func,a,b,y0,h);\r\n% solution routine for Euler's method for solving\r\n%\r\n%      dy\/dt = func(t,y)\r\n%\r\n% USAGE:  [t,y] = odeeuler(func,a,b,y0,h)\r\n%\r\n% input  func    = name of external function to evaluate the RHS\r\n%                  of the ODE\r\n%        a, b    = limits of integration\r\n%        y0      = initial condition\r\n%        h       = stepsize\r\n%\r\n% output [t, y]  = solution vectors\r\n\r\nt = [a];\r\ny = [y0];\r\ni = 1;\r\n\r\nwhile t(i) &lt; b\r\n\r\n   i = i+1;\r\n\r\n   t(i) = a + (i-1)*h;\r\n\r\n   y(i) = y(i-1) + h*feval(func,t(i-1),y(i-1));\r\n\r\nend<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>function [t,y] = odeeuler(func,a,b,y0,h); % solution routine for Euler&#8217;s method for solving % % dy\/dt = func(t,y) % % USAGE: [t,y] = odeeuler(func,a,b,y0,h) % % input func = name of external function to evaluate the RHS % of the ODE % a, b = limits of integration % y0 = initial condition % h = [&hellip;]<\/p>\n","protected":false},"author":22,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"categories":[],"tags":[],"class_list":["post-524","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/pages\/524","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/users\/22"}],"replies":[{"embeddable":true,"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/comments?post=524"}],"version-history":[{"count":1,"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/pages\/524\/revisions"}],"predecessor-version":[{"id":525,"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/pages\/524\/revisions\/525"}],"wp:attachment":[{"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/media?parent=524"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/categories?post=524"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/tags?post=524"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}