{"id":624,"date":"2010-01-24T21:48:29","date_gmt":"2010-01-24T20:48:29","guid":{"rendered":"http:\/\/morony.pl\/?p=624"},"modified":"2010-01-24T21:48:29","modified_gmt":"2010-01-24T20:48:29","slug":"matlab-substring-substr","status":"publish","type":"post","link":"https:\/\/morony.pl\/?p=624","title":{"rendered":"Matlab: substring, substr"},"content":{"rendered":"<p><a style=\"float:left;margin-right:5px;border:1px solid black;\" href=\"http:\/\/morony.pl\/wp-content\/uploads\/2010\/01\/polish.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/morony.pl\/wp-content\/uploads\/2010\/01\/polish.png\" alt=\"\" title=\"polish\" width=\"50\" height=\"31\" class=\"alignnone size-full wp-image-626\" \/><\/a>Niedo\u015bwiadczony u\u017cytkownik mo\u017ce szuka\u0107 w Matlabie funkcji wycinaj\u0105cej kawa\u0142ek ci\u0105gu znak\u00f3w. Nale\u017cy wtedy pami\u0119ta\u0107, \u017ce ci\u0105g znak\u00f3w w Matlabie jest macierz\u0105 (wektorem) znak\u00f3w. Aby wyci\u0105\u0107 kawa\u0142ek ci\u0105gu znak\u00f3w odwo\u0142ujemy si\u0119 zwyczajnie do zakresu wektora jak w przyk\u0142adzie poni\u017cej:<\/p>\n<pre class=\"prettyprint\">string = 'To jest ci\u0105g znak\u00f3w.';\r\nstring2 = string(9:12);<\/pre>\n<p><a style=\"float:left;margin-right:5px;border:1px solid black;\" href=\"http:\/\/morony.pl\/wp-content\/uploads\/2010\/01\/english.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/morony.pl\/wp-content\/uploads\/2010\/01\/english.png\" alt=\"\" title=\"english\" width=\"50\" height=\"26\" class=\"alignnone size-full wp-image-627\" \/><\/a>Inexperienced user may by looking for the function cutting out a piece of string in MATLAB. You need to remember that a string in MATLAB is a matrix (vector) of characters. To cut a piece of string out you have to refer to the part of that vector as in the example below:<\/p>\n<pre class=\"prettyprint\">string = 'This is simple string.';\r\nstring2 = string(9:14);<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Niedo\u015bwiadczony u\u017cytkownik mo\u017ce szuka\u0107 w Matlabie funkcji wycinaj\u0105cej kawa\u0142ek ci\u0105gu znak\u00f3w. Nale\u017cy wtedy pami\u0119ta\u0107, \u017ce ci\u0105g znak\u00f3w w Matlabie jest macierz\u0105 (wektorem) znak\u00f3w. Aby wyci\u0105\u0107 kawa\u0142ek ci\u0105gu znak\u00f3w odwo\u0142ujemy si\u0119 zwyczajnie do zakresu wektora jak w przyk\u0142adzie poni\u017cej: string = &#8216;To jest ci\u0105g znak\u00f3w.&#8217;; string2 = string(9:12); Inexperienced user may by looking for the function [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23],"tags":[],"_links":{"self":[{"href":"https:\/\/morony.pl\/index.php?rest_route=\/wp\/v2\/posts\/624"}],"collection":[{"href":"https:\/\/morony.pl\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/morony.pl\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/morony.pl\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/morony.pl\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=624"}],"version-history":[{"count":5,"href":"https:\/\/morony.pl\/index.php?rest_route=\/wp\/v2\/posts\/624\/revisions"}],"predecessor-version":[{"id":631,"href":"https:\/\/morony.pl\/index.php?rest_route=\/wp\/v2\/posts\/624\/revisions\/631"}],"wp:attachment":[{"href":"https:\/\/morony.pl\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=624"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/morony.pl\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=624"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/morony.pl\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=624"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}