{"id":254,"date":"2019-05-02T19:28:24","date_gmt":"2019-05-02T11:28:24","guid":{"rendered":"\u4e4b\u524d\u4f7f\u7528matlab\u8fdb\u884c\u4eff\u771f\u7684\u89e3\u6790\u8ba1\u7b97\u3002\u6700\u8fd1\u5728\u5904\u7406\u5b9e\u9a8c\u6570\u636e\uff0c\u4e5f\u4f7f\u7528\u5230\u4e86matlab\uff0c\u5bf9\u4e8e\u4e00\u4e9b\u5e38\u89c1\u7684\u64cd\u4f5c\u8fdb\u884c\u4e00\u4e0b\u5c0f\u7ed3\u3002\n\n<hr \/>\n\n<h3>1. \u62df\u5408<\/h3>\n\n<ul>\n<li>\u4f7f\u7528cftool\u5de5\u5177\u7bb1<\/li>\n<\/ul>\n\n\u5de5\u5177\u7bb1\u64cd\u4f5c\u76f8\u5bf9\u4fbf\u6377\uff0c\u9996\u5148\u5bfc\u5165\u6570\u636e\uff0c\u6253\u5f00\u5de5\u5177\u7bb1\uff0c\u9009\u62e9\u9700\u8981\u62df\u5408\u7684X\u548cY\uff08\u6216Z\uff09\u7684\u6570\u636e\uff0c\u9009\u62e9\u62df\u5408\u7c7b\u578b\uff0c\u53ef\u4ee5\u5b9e\u65f6\u7684\u770b\u5230\u62df\u5408\u7684\u7ed3\u679c\u3002\n\n<ul>\n<li>\u4f7f\u7528fit\u547d\u4ee4<\/li>\n<\/ul>\n\n<a href=\"https:\/\/www.mathworks.com\/help\/curvef"},"modified":"2019-05-02T19:30:21","modified_gmt":"2019-05-02T11:30:21","slug":"matlab-%e7%9b%b8%e5%85%b3%e6%93%8d%e4%bd%9c%e5%b0%8f%e7%bb%93%ef%bc%881%ef%bc%89","status":"publish","type":"post","link":"https:\/\/blog.francis67.cc\/?p=254","title":{"rendered":"Matlab \u76f8\u5173\u64cd\u4f5c\u5c0f\u7ed3\uff081\uff09"},"content":{"rendered":"<p>\u4e4b\u524d\u4f7f\u7528matlab\u8fdb\u884c\u4eff\u771f\u7684\u89e3\u6790\u8ba1\u7b97\u3002\u6700\u8fd1\u5728\u5904\u7406\u5b9e\u9a8c\u6570\u636e\uff0c\u4e5f\u4f7f\u7528\u5230\u4e86matlab\uff0c\u5bf9\u4e8e\u4e00\u4e9b\u5e38\u89c1\u7684\u64cd\u4f5c\u8fdb\u884c\u4e00\u4e0b\u5c0f\u7ed3\u3002<\/p>\n<hr \/>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 eztoc-toggle-hide-by-default' ><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/blog.francis67.cc\/?p=254\/#1_%E6%8B%9F%E5%90%88\" >1. \u62df\u5408<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/blog.francis67.cc\/?p=254\/#2_%E6%89%B9%E9%87%8F%E8%AF%BB%E5%8F%96csv%E6%96%87%E4%BB%B6\" >2. \u6279\u91cf\u8bfb\u53d6.csv\u6587\u4ef6<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/blog.francis67.cc\/?p=254\/#3_%E5%B8%B8%E7%94%A8%E5%87%BD%E6%95%B0\" >3. \u5e38\u7528\u51fd\u6570<\/a><\/li><\/ul><\/nav><\/div>\n<h3><span class=\"ez-toc-section\" id=\"1_%E6%8B%9F%E5%90%88\"><\/span>1. \u62df\u5408<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ul>\n<li>\u4f7f\u7528cftool\u5de5\u5177\u7bb1<\/li>\n<\/ul>\n<p>\u5de5\u5177\u7bb1\u64cd\u4f5c\u76f8\u5bf9\u4fbf\u6377\uff0c\u9996\u5148\u5bfc\u5165\u6570\u636e\uff0c\u6253\u5f00\u5de5\u5177\u7bb1\uff0c\u9009\u62e9\u9700\u8981\u62df\u5408\u7684X\u548cY\uff08\u6216Z\uff09\u7684\u6570\u636e\uff0c\u9009\u62e9\u62df\u5408\u7c7b\u578b\uff0c\u53ef\u4ee5\u5b9e\u65f6\u7684\u770b\u5230\u62df\u5408\u7684\u7ed3\u679c\u3002<\/p>\n<ul>\n<li>\u4f7f\u7528fit\u547d\u4ee4<\/li>\n<\/ul>\n<p><a href=\"https:\/\/www.mathworks.com\/help\/curvefit\/fit.html?searchHighlight=fit&amp;s_tid=doc_srchtitle\" title=\"fit\u51fd\u6570\">fit\u547d\u4ee4<\/a> \u53ef\u4ee5\u7528\u4e8e\u62df\u5408\u51fd\u6570\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0cfit\u547d\u4ee4\u8fd4\u56de\u7684fitobject\u5bf9\u8c61\u3002<br \/>\n\u53ef\u4ee5\u7528 <a href=\"https:\/\/www.mathworks.com\/help\/curvefit\/fit-postprocessing.html\" title=\"Fit Postprocessing\">Fit Postprocessing<\/a> \u62df\u5408\u540e\u5904\u7406\u51fd\u6570\uff0c\u4ece\u5bf9\u8c61\u4e2d\u63d0\u53d6\u9700\u8981\u7684\u5185\u5bb9\u3002<br \/>\n\u5982<code>feval(fitobject)<\/code>\u53ef\u4ee5\u5f97\u5230\u62df\u5408\u540e\u7684\u6570\u503c\uff0c<code>plot(fitobject)<\/code>\u53ef\u4ee5\u7ed8\u5236\u62df\u5408\u524d\u540e\u7684\u56fe\u50cf\u3002<\/p>\n<h3><span class=\"ez-toc-section\" id=\"2_%E6%89%B9%E9%87%8F%E8%AF%BB%E5%8F%96csv%E6%96%87%E4%BB%B6\"><\/span>2. \u6279\u91cf\u8bfb\u53d6.csv\u6587\u4ef6<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>dir\u547d\u4ee4\u53ef\u4ee5\u5217\u51fa\u6587\u4ef6\u5939\u5185\u5bb9<br \/>\n<code>dir(*.csv)<\/code>\u53ef\u4ee5\u5217\u51fa\u5f53\u524d\u6587\u4ef6\u5939\u6240\u6709.csv\u6587\u4ef6\uff0c\u7136\u540e\u6211\u7684\u505a\u6cd5\u662f\u518d\u518d\u5f53\u524d\u6587\u4ef6\u5939\u4e0b\u4fdd\u5b58\u4e3a.mat\u6587\u4ef6\uff0c\u4ee5\u4f9b\u540e\u7eed\u4f7f\u7528\u3002<\/p>\n<p><code>csvread('filename',r,c)<\/code> \u53ef\u4ee5\u7528\u6765\u8bfb\u53d6.csv\u6587\u4ef6\uff0cr\uff0cc\uff0c\u5206\u522b\u7528\u4e8e\u5f00\u59cb\u4ece\u8868\u4e2d\u8bfb\u53d6\u6570\u636e\u7684\u504f\u79fb\u91cf\u3002<\/p>\n<p>\u6587\u4ef6\u8def\u5f84<br \/>\n\u5f53\u524d\u8def\u5f84\u4e0b \uff08mat\u548cm\u6587\u4ef6\u5728\u4e00\u8d77\uff09\uff1a <code>load  ***.mat;<\/code><br \/>\n\u5728\u4e0b\u4e00\u7ea7\u8def\u5f84\u4e0b\uff1a<code>load  .\\\u4e0b\u4e00\u7ea7\u8def\u5f84\u7684\u6587\u4ef6\u540d\\***.mat;<\/code><br \/>\n\u5728\u4e0a\u4e00\u7ea7\u8def\u5f84\u4e0b\uff1a<code>load  ..\\***.mat;<\/code><br \/>\n\u5728\u5e73\u884c\u6587\u4ef6\u5939\u5185: <code>load  ..\\\u5e73\u884c\u7684\u6587\u4ef6\u5939\\***.mat;<\/code><\/p>\n<h3><span class=\"ez-toc-section\" id=\"3_%E5%B8%B8%E7%94%A8%E5%87%BD%E6%95%B0\"><\/span>3. \u5e38\u7528\u51fd\u6570<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ul>\n<li>size<br \/>\n\u4e3b\u8981\u7528\u6765\u83b7\u5f97\u77e9\u9635\u7684\u5404\u4e2a\u7ef4\u6570\u7684\u5927\u5c0f\uff0c\u6216\u8005\u6307\u5b9a\u7ef4\u6570\u7684\u5927\u5c0f\u3002<\/p>\n<\/li>\n<li>\n<p>length<br \/>\n\u7528\u6765\u83b7\u5f97\u4e00\u7ef4\u6570\u7ec4\u7684\u957f\u5ea6\u6216\u8005\u591a\u7ef4\u6570\u7ec4\u4e2d\u6700\u5927\u7684\u7ef4\u6570<\/p>\n<\/li>\n<li>\n<p>array(array==0)=[]<br \/>\n\u5220\u96640\u503c<\/p>\n<\/li>\n<li>\n<p>max \u3001min<br \/>\n\u6700\u503c<\/p>\n<\/li>\n<li>\n<p>mean \u3001norm<br \/>\n\u7b97\u6570\u5e73\u5747\u503c\uff0c\u5e73\u65b9\u548c\u5f00\u6839\u53f7<\/p>\n<\/li>\n<\/ul>\n<hr \/>\n<p>\u6700\u540e\uff0c\u6700\u91cd\u8981\u7684\u4ecd\u7136\u662f\u52e4\u4e8e\u641c\u7d22\u548c\u7ffb\u9605\u624b\u518c\u3002<\/p>\n<p>\u6b22\u8fce\u70b9\u51fb Mathworks\u5b98\u65b9\u7684 <a href=\"https:\/\/www.mathworks.com\/help\/\" title=\"\u5728\u7ebf\u6587\u6863\">\u5728\u7ebf\u6587\u6863<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e4b\u524d\u4f7f\u7528matlab\u8fdb\u884c\u4eff\u771f\u7684\u89e3\u6790\u8ba1\u7b97\u3002\u6700\u8fd1\u5728\u5904\u7406\u5b9e\u9a8c\u6570\u636e\uff0c\u4e5f\u4f7f\u7528\u5230\u4e86matlab\uff0c\u5bf9\u4e8e\u4e00\u4e9b\u5e38\u89c1\u7684\u64cd\u4f5c\u8fdb\u884c\u4e00\u4e0b [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[152,150,153,151],"class_list":["post-254","post","type-post","status-publish","format-standard","hentry","category-notes","tag-csv","tag-matlab","tag-153","tag-151"],"_links":{"self":[{"href":"https:\/\/blog.francis67.cc\/index.php?rest_route=\/wp\/v2\/posts\/254","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.francis67.cc\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.francis67.cc\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.francis67.cc\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.francis67.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=254"}],"version-history":[{"count":5,"href":"https:\/\/blog.francis67.cc\/index.php?rest_route=\/wp\/v2\/posts\/254\/revisions"}],"predecessor-version":[{"id":259,"href":"https:\/\/blog.francis67.cc\/index.php?rest_route=\/wp\/v2\/posts\/254\/revisions\/259"}],"wp:attachment":[{"href":"https:\/\/blog.francis67.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=254"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.francis67.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=254"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.francis67.cc\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=254"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}