{"id":276,"date":"2011-05-27T12:26:22","date_gmt":"2011-05-27T12:26:22","guid":{"rendered":"https:\/\/blogs.mathworks.com\/loren\/2011\/05\/27\/transferring-data-between-two-computers-using-matlab\/"},"modified":"2018-01-08T16:12:14","modified_gmt":"2018-01-08T21:12:14","slug":"transferring-data-between-two-computers-using-matlab","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/loren\/2011\/05\/27\/transferring-data-between-two-computers-using-matlab\/","title":{"rendered":"Transferring Data Between Two Computers Using MATLAB"},"content":{"rendered":"<div xmlns:mwsh=\"https:\/\/www.mathworks.com\/namespace\/mcode\/v1\/syntaxhighlight.dtd\" class=\"content\">\r\n   <introduction>\r\n      <p>This week's guest bloggers <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/authors\/29271\">Ankit Desai<\/a> and <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/authors\/34202\">Vinod Cherian<\/a> work on various aspects of using MATLAB to control instruments, make measurements with hardware, retrieve data from instruments,\r\n         and do custom analysis in MATLAB. In this post they talk about transferring data between two separate MATLAB sessions using\r\n         TCP\/IP client-servers.\r\n      <\/p>\r\n      <p>There are many cases where an operation needs to be performed in one MATLAB session and the data needs to be transferred to\r\n         a different machine for further analysis and visualization in MATLAB. Many of you have asked about transferring MATLAB arrays\r\n         between two MATLAB sessions on <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/answers\/\">MATLAB Answers<\/a>, the <a>MATLAB newsgroup<\/a>, and through technical support.\r\n      <\/p>\r\n      <p>To show you an example of how this may be accomplished we've written an example that transfers the array of data required\r\n         to create an L-shaped membrane.  The script uses the <a href=\"https:\/\/www.mathworks.com\/help\/releases\/R2011a\/toolbox\/instrument\/tcpip.html\"><tt>tcpip<\/tt><\/a> function in <a href=\"https:\/\/www.mathworks.com\/products\/instrument\/\">Instrument Control Toolbox<\/a>. Specifically it uses the new <a href=\"https:\/\/www.mathworks.com\/help\/releases\/R2011a\/toolbox\/instrument\/networkrole.html\"><tt>NetworkRole<\/tt><\/a> property, which is a new property of <tt>tcpip<\/tt> objects in R2011a.\r\n      <\/p>\r\n      <p>The example consists of two parts:<\/p>\r\n      <div>\r\n         <ul>\r\n            <li>A MATLAB session on a server that needs to transfer its data out<\/li>\r\n            <li>A second MATLAB session on a client computer that retrieves and plots the data<\/li>\r\n         <\/ul>\r\n      <\/div>\r\n   <\/introduction>\r\n   <h3>Contents<\/h3>\r\n   <div>\r\n      <ul>\r\n         <li><a href=\"#1\">Setting Up a MATLAB TCPIP Server Session<\/a><\/li>\r\n         <li><a href=\"#6\">Setting Up the MATLAB Client Session<\/a><\/li>\r\n         <li><a href=\"#14\">Closing Notes<\/a><\/li>\r\n      <\/ul>\r\n   <\/div>\r\n   <h3>Setting Up a MATLAB TCPIP Server Session<a name=\"1\"><\/a><\/h3>\r\n   <p>The MATLAB server session creates a data set to be transferred out, opens a TCP\/IP server socket and waits for the client\r\n      to connect to it. When the connection is established, the data is written out to the socket.\r\n   <\/p>\r\n   <p>Prepare the data we want to send over to the client MATLAB session. In this case our data is created by a call to the <tt>membrane<\/tt> function.\r\n   <\/p><pre style=\"background: #F9F7F3; padding: 10px; border: 1px solid rgb(200,200,200)\">data = membrane(1);<\/pre><p>Let us list details of the data set we want to transfer. We will use this information later to set up some parameters on the\r\n      server socket and in the client.\r\n   <\/p><pre style=\"background: #F9F7F3; padding: 10px; border: 1px solid rgb(200,200,200)\">s = whos(<span style=\"color: #A020F0\">'data'<\/span>)<\/pre><pre style=\"font-style:oblique\">s = \r\n          name: 'data'\r\n          size: [31 31]\r\n         bytes: 7688\r\n         class: 'double'\r\n        global: 0\r\n        sparse: 0\r\n       complex: 0\r\n       nesting: [1x1 struct]\r\n    persistent: 0\r\n<\/pre><p>Get the dimensions of the data array we will be transferring.<\/p><pre style=\"background: #F9F7F3; padding: 10px; border: 1px solid rgb(200,200,200)\">s.size<\/pre><pre style=\"font-style:oblique\">ans =\r\n    31    31\r\n<\/pre><p>Get the number of bytes of data we will be transferring.<\/p><pre style=\"background: #F9F7F3; padding: 10px; border: 1px solid rgb(200,200,200)\">s.bytes<\/pre><pre style=\"font-style:oblique\">ans =\r\n        7688\r\n<\/pre><p>Start a TCP\/IP server socket in MATLAB. By setting the IP address to <tt>'0.0.0.0'<\/tt> the server socket will accept connections on the specified port (arbitrarily chosen to be 55000 in our case) from any IP\r\n      address. You can  restrict the TCP\/IP server socket to only accept incoming connections from a specific IP address by explicitly\r\n      specifying the IP address. Note the new property <tt>NetworkRole<\/tt>.\r\n   <\/p><pre> tcpipServer = tcpip('0.0.0.0',55000,'NetworkRole','Server');<\/pre><p>Set the <a href=\"https:\/\/www.mathworks.com\/help\/releases\/R2011a\/techdoc\/\/matlab_external\/outputbuffersize.html\"><tt>OutputBufferSize<\/tt><\/a> property to a value large enough to hold the data. This is the first place where we use the output of the <tt>whos<\/tt> function, specifically the value of <tt>s.bytes<\/tt>.\r\n   <\/p><pre> set(tcpipServer,'OutputBufferSize',s.bytes);<\/pre><p>Open the server socket and wait indefinitely for a connection. This line will cause MATLAB to wait until an incoming connection\r\n      is established.\r\n   <\/p><pre> fopen(tcpipServer);<\/pre><p>Since the MATLAB server code is running in a separate MATLAB session than the client, you may notice the <tt>Busy<\/tt> status next to the MATLAB <a href=\"https:\/\/www.mathworks.com\/help\/releases\/R2011a\/techdoc\/\/matlab_env\/f1-83992.html\">Start Button<\/a> in the server session until the following commands have been executed. You may stop the MATLAB server socket creation and\r\n      break out of this busy state by using the Control-C key combination to close the server socket. Note that once you close the\r\n      server socket clients will no longer be able to connect to it until it has been re-opened.\r\n   <\/p>\r\n   <p>Once the connection is made by the client, write the data out and close the server.<\/p><pre> fwrite(tcpipServer,data(:),'double');\r\n fclose(tcpipServer);<\/pre><h3>Setting Up the MATLAB Client Session<a name=\"6\"><\/a><\/h3>\r\n   <p>The MATLAB server session is running on a computer with a known IP address or hostname. In our case, this is the address <tt>'127.0.0.1'<\/tt>. The second MATLAB session that acts as the client application creates a TCP\/IP client, connects to the server and retrieves\r\n      the data. Once retrieved, the data will be visualized in the client session.\r\n   <\/p>\r\n   <p>Create a MATLAB client connection to our MATLAB server socket. Note the value of the <tt>NetworkRole<\/tt> property on the client. Also note that the port number of the client matches that selected for the server.\r\n   <\/p><pre style=\"background: #F9F7F3; padding: 10px; border: 1px solid rgb(200,200,200)\">tcpipClient = tcpip(<span style=\"color: #A020F0\">'127.0.0.1'<\/span>,55000,<span style=\"color: #A020F0\">'NetworkRole'<\/span>,<span style=\"color: #A020F0\">'Client'<\/span>)<\/pre><pre style=\"font-style:oblique\">\r\n   TCPIP Object : TCPIP-127.0.0.1\r\n\r\n   Communication Settings \r\n      RemotePort:         55000\r\n      RemoteHost:         127.0.0.1\r\n      Terminator:         'LF'\r\n      NetworkRole:        client\r\n\r\n   Communication State \r\n      Status:             closed\r\n      RecordStatus:       off\r\n\r\n   Read\/Write State  \r\n      TransferStatus:     idle\r\n      BytesAvailable:     0\r\n      ValuesReceived:     0\r\n      ValuesSent:         0\r\n \r\n<\/pre><p>Set the <a href=\"https:\/\/www.mathworks.com\/help\/releases\/R2011a\/techdoc\/\/matlab_external\/inputbuffersize.html\"><tt>InputBufferSize<\/tt><\/a> property so we have sufficient room to hold the data that will be sent to us by the server. The number 7688 is the number\r\n      of bytes in the data array. For more general purpose code, you can parametrize this code by using the value in <tt>s.bytes<\/tt> instead of the hard-coded value of 7688.\r\n   <\/p><pre style=\"background: #F9F7F3; padding: 10px; border: 1px solid rgb(200,200,200)\">set(tcpipClient,<span style=\"color: #A020F0\">'InputBufferSize'<\/span>,7688);<\/pre><p>I will define a long value for the <a href=\"https:\/\/www.mathworks.com\/help\/releases\/R2011a\/toolbox\/instrument\/timeout.html\"><tt>Timeout<\/tt><\/a>; the waiting time for any read or write operation to complete. Adjust this value to ensure that any data that is being transferred\r\n      to the client will be read back within the selected timeout.\r\n   <\/p><pre style=\"background: #F9F7F3; padding: 10px; border: 1px solid rgb(200,200,200)\">set(tcpipClient,<span style=\"color: #A020F0\">'Timeout'<\/span>,30);<\/pre><p>Open a TCPIP connection to the server.<\/p><pre style=\"background: #F9F7F3; padding: 10px; border: 1px solid rgb(200,200,200)\">fopen(tcpipClient);<\/pre><p>Read the data that is being written out on the server. Note that the data types need to be matched up on the client and server.\r\n      The number of <tt>double<\/tt> values to be read back from the server socket is 961. For more general purpose code, you may parametrize the second argument\r\n      using <tt>prod(s.size)<\/tt>, for example.\r\n   <\/p><pre style=\"background: #F9F7F3; padding: 10px; border: 1px solid rgb(200,200,200)\">rawData = fread(tcpipClient,961,<span style=\"color: #A020F0\">'double'<\/span>);<\/pre><p>Close the connection to the server once we've retrieved the data.<\/p><pre style=\"background: #F9F7F3; padding: 10px; border: 1px solid rgb(200,200,200)\">fclose(tcpipClient);<\/pre><p>Reshape the data array and plot it. You can parametrize this by specifying <tt>s.size<\/tt> as the input to <tt>reshape<\/tt> instead of the hard-coded array size (31x31).\r\n   <\/p><pre style=\"background: #F9F7F3; padding: 10px; border: 1px solid rgb(200,200,200)\">reshapedData = reshape(rawData,31,31);\r\nsurf(reshapedData);<\/pre><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/loren\/276\/TCPIP_Transfer_01.png\"> <h3>Closing Notes<a name=\"14\"><\/a><\/h3>\r\n   <p>Note that this functionality is meant to be used behind a firewall or on a private network, and should be used in accordance\r\n      with the license agreement as it relates to your particular license option and activation type. For more information on using\r\n      MATLAB TCP\/IP server sockets refer to the <a href=\"https:\/\/www.mathworks.com\/help\/releases\/R2011a\/toolbox\/instrument\/bswpn6l.html\">documentation<\/a>.\r\n   <\/p>\r\n   <p>We could see a number of uses of this functionality; an example being using MATLAB on an instrument used to gather data. Using\r\n      TCP\/IP server sockets in MATLAB it is now possible to transfer the data out, without the need for files, to a remote computer\r\n      for further analysis and visualization in MATLAB.\r\n   <\/p>\r\n   <p>How do you see this functionality being used? Post your responses <a href=\"https:\/\/blogs.mathworks.com\/loren\/?p=276#respond\">here<\/a>.\r\n   <\/p><script language=\"JavaScript\">\r\n<!--\r\n\r\n    function grabCode_dfe37930c60444f28414b9c1972e949c() {\r\n        \/\/ Remember the title so we can use it in the new page\r\n        title = document.title;\r\n\r\n        \/\/ Break up these strings so that their presence\r\n        \/\/ in the Javascript doesn't mess up the search for\r\n        \/\/ the MATLAB code.\r\n        t1='dfe37930c60444f28414b9c1972e949c ' + '##### ' + 'SOURCE BEGIN' + ' #####';\r\n        t2='##### ' + 'SOURCE END' + ' #####' + ' dfe37930c60444f28414b9c1972e949c';\r\n    \r\n        b=document.getElementsByTagName('body')[0];\r\n        i1=b.innerHTML.indexOf(t1)+t1.length;\r\n        i2=b.innerHTML.indexOf(t2);\r\n \r\n        code_string = b.innerHTML.substring(i1, i2);\r\n        code_string = code_string.replace(\/REPLACE_WITH_DASH_DASH\/g,'--');\r\n\r\n        \/\/ Use \/x3C\/g instead of the less-than character to avoid errors \r\n        \/\/ in the XML parser.\r\n        \/\/ Use '\\x26#60;' instead of '<' so that the XML parser\r\n        \/\/ doesn't go ahead and substitute the less-than character. \r\n        code_string = code_string.replace(\/\\x3C\/g, '\\x26#60;');\r\n\r\n        author = 'Vinod Cherian and Ankit Desai';\r\n        copyright = 'Copyright 2011 The MathWorks, Inc.';\r\n\r\n        w = window.open();\r\n        d = w.document;\r\n        d.write('<pre>\\n');\r\n        d.write(code_string);\r\n\r\n        \/\/ Add author and copyright lines at the bottom if specified.\r\n        if ((author.length > 0) || (copyright.length > 0)) {\r\n            d.writeln('');\r\n            d.writeln('%%');\r\n            if (author.length > 0) {\r\n                d.writeln('% _' + author + '_');\r\n            }\r\n            if (copyright.length > 0) {\r\n                d.writeln('% _' + copyright + '_');\r\n            }\r\n        }\r\n\r\n        d.write('<\/pre>\\n');\r\n      \r\n      d.title = title + ' (MATLAB code)';\r\n      d.close();\r\n      }   \r\n      \r\n-->\r\n<\/script><p style=\"text-align: right; font-size: xx-small; font-weight:lighter;   font-style: italic; color: gray\"><br><a href=\"javascript:grabCode_dfe37930c60444f28414b9c1972e949c()\"><span style=\"font-size: x-small;        font-style: italic;\">Get \r\n            the MATLAB code \r\n            <noscript>(requires JavaScript)<\/noscript><\/span><\/a><br><br>\r\n      Published with MATLAB&reg; 7.12<br><\/p>\r\n<\/div>\r\n<!--\r\ndfe37930c60444f28414b9c1972e949c ##### SOURCE BEGIN #####\r\n%% Transferring Data Between Two Computers Using MATLAB\r\n% This week's guest bloggers\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/authors\/29271 Ankit\r\n% Desai> and\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/authors\/34202 Vinod\r\n% Cherian> work on various aspects of using MATLAB to control instruments,\r\n% make measurements with hardware, retrieve data from instruments, and do\r\n% custom analysis in MATLAB. In this post they talk about transferring data\r\n% between two separate MATLAB sessions using TCP\/IP client-servers.\r\n%\r\n% There are many cases where an operation needs to be performed in one\r\n% MATLAB session and the data needs to be transferred to a different\r\n% machine for further analysis and visualization in MATLAB. Many of you\r\n% have asked about transferring MATLAB arrays between two MATLAB sessions\r\n% on <https:\/\/www.mathworks.com\/matlabcentral\/answers\/ MATLAB Answers>, the\r\n% <http:\/\/ MATLAB newsgroup>,\r\n% and through technical support.\r\n%\r\n% To show you an example of how this may be accomplished we've written an\r\n% example that transfers the array of data required to create an L-shaped\r\n% membrane.  The script uses the\r\n% <https:\/\/www.mathworks.com\/help\/releases\/R2011a\/toolbox\/instrument\/tcpip.html\r\n% |tcpip|> function in <https:\/\/www.mathworks.com\/products\/instrument\/\r\n% Instrument Control Toolbox>. Specifically it uses the new\r\n% <https:\/\/www.mathworks.com\/help\/releases\/R2011a\/toolbox\/instrument\/networkrole.html\r\n% |NetworkRole|> property, which is a new property of |tcpip| objects in\r\n% R2011a.\r\n%\r\n% The example consists of two parts:\r\n%\r\n% * A MATLAB session on a server that needs to transfer its data out\r\n% * A second MATLAB session on a client computer that retrieves and plots\r\n% the data\r\n%\r\n%% Setting Up a MATLAB TCPIP Server Session\r\n% The MATLAB server session creates a data set to be transferred out, opens\r\n% a TCP\/IP server socket and waits for the client to connect to it. When\r\n% the connection is established, the data is written out to the socket.\r\n%\r\n% Prepare the data we want to send over to the client MATLAB session. In\r\n% this case our data is created by a call to the |membrane| function.\r\ndata = membrane(1);\r\n%%\r\n% Let us list details of the data set we want to transfer. We will use this\r\n% information later to set up some parameters on the server socket and in\r\n% the client. \r\ns = whos('data')\r\n%%\r\n% Get the dimensions of the data array we will be transferring.\r\ns.size\r\n%%\r\n% Get the number of bytes of data we will be transferring.\r\ns.bytes\r\n%%\r\n% Start a TCP\/IP server socket in MATLAB. By setting the IP address to \r\n% |'0.0.0.0'| the server socket will accept connections on the specified \r\n% port (arbitrarily chosen to be 55000 in our case) from any IP address. \r\n% You can  restrict the TCP\/IP server socket to only accept incoming \r\n% connections from a specific IP address by explicitly specifying the IP \r\n% address. Note the new property |NetworkRole|.\r\n%\r\n%   tcpipServer = tcpip('0.0.0.0',55000,'NetworkRole','Server');\r\n%\r\n% Set the <https:\/\/www.mathworks.com\/help\/releases\/R2011a\/techdoc\/\/matlab_external\/outputbuffersize.html |OutputBufferSize|> property to a value large enough to hold the\r\n% data. This is the first place where we use the output of the |whos|\r\n% function, specifically the value of |s.bytes|.\r\n%\r\n%   set(tcpipServer,'OutputBufferSize',s.bytes);\r\n%\r\n% Open the server socket and wait indefinitely for a connection. This line \r\n% will cause MATLAB to wait until an incoming connection is established. \r\n%\r\n%   fopen(tcpipServer);\r\n%\r\n% Since the MATLAB server code is running in a separate MATLAB session than \r\n% the client, you may notice the |Busy| status next to the MATLAB <https:\/\/www.mathworks.com\/help\/releases\/R2011a\/techdoc\/\/matlab_env\/f1-83992.html Start Button> \r\n% in the server session until the following commands have been executed. \r\n% You may stop the MATLAB server socket creation and break out of this \r\n% busy state by using the Control-C key combination to close the server \r\n% socket. Note that once you close the server socket clients will no \r\n% longer be able to connect to it until it has been re-opened.\r\n%\r\n% Once the connection is made by the client, write the data out and close \r\n% the server. \r\n%\r\n%   fwrite(tcpipServer,data(:),'double');\r\n%   fclose(tcpipServer);\r\n%\r\n%% Setting Up the MATLAB Client Session\r\n% The MATLAB server session is running on a computer with a known IP\r\n% address or hostname. In our case, this is the address |'127.0.0.1'|. \r\n% The second MATLAB session that acts as the client application creates a \r\n% TCP\/IP client, connects to the server and retrieves the data. Once \r\n% retrieved, the data will be visualized in the client session.\r\n%%\r\n% Create a MATLAB client connection to our MATLAB server socket. Note the \r\n% value of the |NetworkRole| property on the client. Also note that the\r\n% port number of the client matches that selected for the server.\r\ntcpipClient = tcpip('127.0.0.1',55000,'NetworkRole','Client')\r\n%%\r\n% Set the <https:\/\/www.mathworks.com\/help\/releases\/R2011a\/techdoc\/\/matlab_external\/inputbuffersize.html |InputBufferSize|> property so we have sufficient room to hold the\r\n% data that will be sent to us by the server. The number 7688 is the number\r\n% of bytes in the data array. For more general purpose code, you can \r\n% parametrize this code by using the value in |s.bytes| instead of the \r\n% hard-coded value of 7688.\r\nset(tcpipClient,'InputBufferSize',7688);\r\n%%\r\n% I will define a long value for the <https:\/\/www.mathworks.com\/help\/releases\/R2011a\/toolbox\/instrument\/timeout.html |Timeout|>; the waiting time \r\n% for any read or write operation to complete. Adjust this value to ensure \r\n% that any data that is being transferred to the client will be read back \r\n% within the selected timeout.\r\nset(tcpipClient,'Timeout',30);\r\n%%\r\n% Open a TCPIP connection to the server.\r\nfopen(tcpipClient);\r\n%%\r\n% Read the data that is being written out on the server. Note that the data\r\n% types need to be matched up on the client and server. The number of\r\n% |double| values to be read back from the server socket is 961. For more \r\n% general purpose code, you may parametrize the second argument using\r\n% |prod(s.size)|, for example.\r\nrawData = fread(tcpipClient,961,'double');\r\n%%\r\n% Close the connection to the server once we've retrieved the data.\r\nfclose(tcpipClient);\r\n%%\r\n% Reshape the data array and plot it. You can parametrize this by\r\n% specifying |s.size| as the input to |reshape| instead of the hard-coded \r\n% array size (31x31).\r\nreshapedData = reshape(rawData,31,31);\r\nsurf(reshapedData);\r\n%% Closing Notes\r\n% Note that this functionality is meant to be used behind a firewall or on\r\n% a private network, and should be used in accordance with the license \r\n% agreement as it relates to your particular license option and activation \r\n% type. For more information on using MATLAB TCP\/IP server sockets refer to \r\n% the <https:\/\/www.mathworks.com\/help\/releases\/R2011a\/toolbox\/instrument\/bswpn6l.html documentation>. \r\n% \r\n% We could see a number of uses of this functionality; an example being\r\n% using MATLAB on an instrument used to gather data. Using TCP\/IP server \r\n% sockets in MATLAB it is now possible to transfer the data out, without \r\n% the need for files, to a remote computer for further analysis and \r\n% visualization in MATLAB.\r\n%\r\n% How do you see this functionality being used? Post your responses\r\n% <https:\/\/blogs.mathworks.com\/loren\/?p=276#respond here>.\r\n\r\n\r\n##### SOURCE END ##### dfe37930c60444f28414b9c1972e949c\r\n-->","protected":false},"excerpt":{"rendered":"<p>\r\n   \r\n      This week's guest bloggers Ankit Desai and Vinod Cherian work on various aspects of using MATLAB to control instruments, make measurements with hardware, retrieve data from... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/loren\/2011\/05\/27\/transferring-data-between-two-computers-using-matlab\/\">read more >><\/a><\/p>","protected":false},"author":39,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[39],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/loren\/wp-json\/wp\/v2\/posts\/276"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/loren\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/loren\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/loren\/wp-json\/wp\/v2\/users\/39"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/loren\/wp-json\/wp\/v2\/comments?post=276"}],"version-history":[{"count":1,"href":"https:\/\/blogs.mathworks.com\/loren\/wp-json\/wp\/v2\/posts\/276\/revisions"}],"predecessor-version":[{"id":2606,"href":"https:\/\/blogs.mathworks.com\/loren\/wp-json\/wp\/v2\/posts\/276\/revisions\/2606"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/loren\/wp-json\/wp\/v2\/media?parent=276"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/loren\/wp-json\/wp\/v2\/categories?post=276"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/loren\/wp-json\/wp\/v2\/tags?post=276"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}