{"id":583,"date":"2017-09-14T13:43:45","date_gmt":"2017-09-14T16:43:45","guid":{"rendered":"http:\/\/www.professores.uff.br\/diomarcesarlobao\/?page_id=583"},"modified":"2017-09-14T13:43:45","modified_gmt":"2017-09-14T16:43:45","slug":"splitstr-m","status":"publish","type":"page","link":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/splitstr-m\/","title":{"rendered":"splitstr.m"},"content":{"rendered":"<pre>% example on splitting long format strings in Matlab fprintf statements\r\n\r\nvariable1 = 2;\r\nvariable2 = 4;\r\nvariable3 = 8;\r\n\r\n% a usual short format string...\r\n\r\nfprintf('v1: %f, v2: %f, v3: %f\\n', variable1, variable2, variable3);\r\n\r\n% a split, very long format string...\r\n\r\nfprintf(['This is a long string that',...\r\n         ' will have to be split!',...\r\n         ' Here are the variables: ',...\r\n         ' variable1: %f, variable2: %f,',...\r\n         ' variable3: %f\\n\\n'], variable1,...\r\n           variable2, variable3);\r\n\r\n%\r\n% Three things to note here:\r\n%\r\n% 1) to break up a long format string, you require the format string to\r\n%    delimitted as ['format string'] instead of just 'format string'\r\n%\r\n% 2) you require a \",...\" at the end of each split line\r\n%\r\n% 3) you can break up both the format string and the variable list\r\n%<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>% example on splitting long format strings in Matlab fprintf statements variable1 = 2; variable2 = 4; variable3 = 8; % a usual short format string&#8230; fprintf(&#8216;v1: %f, v2: %f, v3: %f\\n&#8217;, variable1, variable2, variable3); % a split, very long format string&#8230; fprintf([&#8216;This is a long string that&#8217;,&#8230; &#8216; will have to be split!&#8217;,&#8230; &#8216; [&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-583","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/pages\/583","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=583"}],"version-history":[{"count":1,"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/pages\/583\/revisions"}],"predecessor-version":[{"id":584,"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/pages\/583\/revisions\/584"}],"wp:attachment":[{"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/media?parent=583"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/categories?post=583"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/tags?post=583"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}