{"id":3038,"date":"2011-12-23T08:41:34","date_gmt":"2011-12-23T13:41:34","guid":{"rendered":"https:\/\/blogs.mathworks.com\/pick\/?p=3038"},"modified":"2011-12-23T08:41:34","modified_gmt":"2011-12-23T13:41:34","slug":"get-information-about-your-computer","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/pick\/2011\/12\/23\/get-information-about-your-computer\/","title":{"rendered":"Get Information About Your Computer"},"content":{"rendered":"<div xmlns:mwsh=\"https:\/\/www.mathworks.com\/namespace\/mcode\/v1\/syntaxhighlight.dtd\" class=\"content\">\r\n   <introduction><\/introduction>\r\n   <p><a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/authors\/911\">Brett<\/a>'s Pick this week is <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/33155-cpu-info\">CPU Info<\/a> by <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/authors\/80363\">Ben Tordoff<\/a>.\r\n   <\/p>\r\n   <p>Today's is a quick-Pick, to go with our holiday greetings.<\/p>\r\n   <p>Occasionally, you might want to know some hard-to-find information about your computer. You could spend some time digging\r\n      around in your documentation, or you could simply download and run Ben's CPU Info file. More important than just the information\r\n      that Ben has elected to write out is that you can readily modify his code to extract all kinds of additional information.\r\n      Unmodified, his function returns information like this:\r\n   <\/p><pre style=\"background: #F9F7F3; padding: 10px; border: 1px solid rgb(200,200,200)\">myComputerInfo = cpuinfo\r\nmyComputerInfo.Name<\/pre><pre style=\"font-style:oblique\">myComputerInfo = \r\n             Name: [1x40 char]\r\n            Clock: '2701 MHz'\r\n            Cache: '256 KB'\r\n    NumProcessors: 2\r\n           OSType: 'Windows'\r\n        OSVersion: [1x30 char]\r\nans =\r\nIntel(R) Core(TM) i7-2620M CPU @ 2.70GHz\r\n<\/pre><p><\/p><p>It doesn't get easier than that!<\/p>\r\n   <p>Thanks, Ben, and Happy Holidays, everyone! Looking forward to a great 2012!<\/p>\r\n   <p>As always, <a href=\"https:\/\/blogs.mathworks.com\/pick\/?p=3038#respond\">comments to this blog post<\/a> are welcome. Or leave a comment for Ben <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/33155-cpu-info#comments\">here<\/a>.\r\n   <\/p><script language=\"JavaScript\">\r\n<!--\r\n\r\n    function grabCode_8dad9a0f81ad43438170b3b5f8dc466e() {\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='8dad9a0f81ad43438170b3b5f8dc466e ' + '##### ' + 'SOURCE BEGIN' + ' #####';\r\n        t2='##### ' + 'SOURCE END' + ' #####' + ' 8dad9a0f81ad43438170b3b5f8dc466e';\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 = 'Brett Shoelson';\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_8dad9a0f81ad43438170b3b5f8dc466e()\"><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.13<br><\/p>\r\n<\/div>\r\n<!--\r\n8dad9a0f81ad43438170b3b5f8dc466e ##### SOURCE BEGIN #####\r\n%% Get Information About Your Computer\r\n%% \r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/authors\/911 Brett>'s Pick this week is\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/33155-cpu-info CPU Info> by \r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/authors\/80363 Ben Tordoff>.\r\n\r\n%%\r\n% Today's is a quick-Pick, to go with our holiday greetings.\r\n\r\n%%\r\n% Occasionally, you might want to know some hard-to-find\r\n% information about your computer. You could spend some time\r\n% digging around in your documentation, or you could simply\r\n% download and run Ben's CPU Info file. More important than\r\n% just the information that Ben has elected to write out is\r\n% that you can readily modify his code to extract all kinds\r\n% of additional information. Unmodified, his function\r\n% returns information like this:\r\n%\r\n%%\r\nmyComputerInfo = cpuinfo\r\nmyComputerInfo.Name\r\n\r\n\r\n%%\r\n%\r\n% It doesn't get easier than that!\r\n\r\n%%\r\n% Thanks, Ben, and Happy Holidays, everyone! Looking forward to a great 2012!\r\n\r\n%% \r\n% As always, <https:\/\/blogs.mathworks.com\/pick\/?p=3038#respond comments to this blog post> are welcome. Or leave a\r\n% comment for Ben <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/33155-cpu-info#comments here>.\r\n##### SOURCE END ##### 8dad9a0f81ad43438170b3b5f8dc466e\r\n-->","protected":false},"excerpt":{"rendered":"<p>\r\n   \r\n   Brett's Pick this week is CPU Info by Ben Tordoff.\r\n   \r\n   Today's is a quick-Pick, to go with our holiday greetings.\r\n   Occasionally, you might want to know some hard-to-find information... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/pick\/2011\/12\/23\/get-information-about-your-computer\/\">read more >><\/a><\/p>","protected":false},"author":34,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[16],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/3038"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/users\/34"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/comments?post=3038"}],"version-history":[{"count":8,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/3038\/revisions"}],"predecessor-version":[{"id":3054,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/3038\/revisions\/3054"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/media?parent=3038"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/categories?post=3038"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/tags?post=3038"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}