{"id":10310,"date":"2018-11-20T09:00:54","date_gmt":"2018-11-20T14:00:54","guid":{"rendered":"https:\/\/blogs.mathworks.com\/pick\/?p=10310"},"modified":"2018-11-20T02:03:45","modified_gmt":"2018-11-20T07:03:45","slug":"drawing-shear-force-bending-moment-diagram","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/pick\/2018\/11\/20\/drawing-shear-force-bending-moment-diagram\/","title":{"rendered":"Drawing Shear Force, Bending Moment Diagram"},"content":{"rendered":"\r\n<div class=\"content\"><p><a href=\"http:\/\/www.mathworks.com\/matlabcentral\/profile\/authors\/869871\">Jiro<\/a>&#8216;s pick this week is <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/51047\">Shear Force Bending Moment<\/a> by <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/profile\/authors\/2376472\">Lateef Adewale Kareem<\/a>.<\/p><p>As an ex-mechanical engineer, I remember my statics course where I learned how to do <a href=\"https:\/\/en.wikipedia.org\/wiki\/Shear_and_moment_diagram\">shear force bending moment diagram<\/a>. I remember really enjoying that topic, since the steps to drawing the diagram is very systematic. When things are very systematic, it&#8217;s suitable for automation. And this is what exactly Lateef did with this entry.<\/p><pre class=\"language-matlab\">SFBM(<span class=\"string\">'Example'<\/span>,[20,5,20],{<span class=\"string\">'CF'<\/span>,-2,0},{<span class=\"string\">'M'<\/span>,10,8},{<span class=\"string\">'DF'<\/span>,5,[1,3]},{<span class=\"string\">'M'<\/span>,-10,12},{<span class=\"string\">'DF'<\/span>,-4,[14,17]});\r\n<\/pre><p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/pick\/jiro\/potw_sfbm\/potw_shear_moment_example.png\" alt=\"\"> <\/p><p>You call the function by specifying the length of the beam and the locations of the supports. Then you specify one by one the various types of loads, namely &#8220;point load&#8221;, &#8220;moment&#8221;, and &#8220;distributed load&#8221;, that are placed on the beam. Let&#8217;s decode the syntax above.<\/p><div><ul><li><tt>[20,5,20]<\/tt> &#8211; length of bar: 20m, support at 5m and 20m<\/li><li><tt>{'CF',-2,0}<\/tt> &#8211; point load of -2KN at 0m<\/li><li><tt>{'M',10,8}<\/tt> &#8211; moment of 10KNm at 8m<\/li><li><tt>{'DF',5,[1,3]}<\/tt> &#8211; distributed load of 5KN\/m from 1m to 3m<\/li><li><tt>{'M',-10,12}<\/tt> &#8211; moment of -10KNm at 12m<\/li><li><tt>{'DF',-4,[14,17]}<\/tt> &#8211; distributed load of -4KN\/m from 14m to 17m<\/li><\/ul><\/div><p>You can create an arbitrary linearly distributed load by simply changing the &#8216;DF&#8217; parameter.<\/p><pre class=\"language-matlab\">SFBM(<span class=\"string\">'Example'<\/span>,[20 5 20],{<span class=\"string\">'DF'<\/span>,[5 30],[7 15]})\r\n<\/pre><p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/pick\/jiro\/potw_sfbm\/potw_linear_load.png\" alt=\"\"> <\/p><p>By increasing the number of break points, you can describe a non-linearly distributed load, expressed as a polynomial.<\/p><pre class=\"language-matlab\">SFBM(<span class=\"string\">'Example'<\/span>,[20 5 20],{<span class=\"string\">'DF'<\/span>,[0 25 30],[7 10 15]})\r\n<\/pre><p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/pick\/jiro\/potw_sfbm\/potw_quadratic_load.png\" alt=\"\"> <\/p><p>I also appreciate how active Lateef is in maintaining this File Exchange entry. As you can see from the <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/51047#comment\">comments<\/a> section, he has active conversations with his users, and he has been updating the entry regularly. Thank you for your dedicated contribution to the community, Lateef!<\/p><p><b>Comments<\/b><\/p><p>Give it a try and let us know what you think <a href=\"http:\/\/blogs.mathworks.com\/pick\/?p=10310#respond\">here<\/a> or leave a <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/51047#comment\">comment<\/a> for Lateef.<\/p><script language=\"JavaScript\"> <!-- \r\n    function grabCode_60af2ffc87ed4154a1094cc63614ca6c() {\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='60af2ffc87ed4154a1094cc63614ca6c ' + '##### ' + 'SOURCE BEGIN' + ' #####';\r\n        t2='##### ' + 'SOURCE END' + ' #####' + ' 60af2ffc87ed4154a1094cc63614ca6c';\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        copyright = 'Copyright 2018 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 copyright line at the bottom if specified.\r\n        if (copyright.length > 0) {\r\n            d.writeln('');\r\n            d.writeln('%%');\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     --> <\/script><p style=\"text-align: right; font-size: xx-small; font-weight:lighter;   font-style: italic; color: gray\"><br><a href=\"javascript:grabCode_60af2ffc87ed4154a1094cc63614ca6c()\"><span style=\"font-size: x-small;        font-style: italic;\">Get \r\n      the MATLAB code <noscript>(requires JavaScript)<\/noscript><\/span><\/a><br><br>\r\n      Published with MATLAB&reg; R2018b<br><\/p><p class=\"footer\"><br>\r\n      Published with MATLAB&reg; R2018b<br><\/p><\/div><!--\r\n60af2ffc87ed4154a1094cc63614ca6c ##### SOURCE BEGIN #####\r\n%%\r\n% <http:\/\/www.mathworks.com\/matlabcentral\/profile\/authors\/869871 Jiro>'s\r\n% pick this week is\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/51047 Shear Force\r\n% Bending Moment> by\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/profile\/authors\/2376472 Lateef\r\n% Adewale Kareem>.\r\n%\r\n% As an ex-mechanical engineer, I remember my statics course where I\r\n% learned how to do <https:\/\/en.wikipedia.org\/wiki\/Shear_and_moment_diagram\r\n% shear force bending moment diagram>. I remember really enjoying that\r\n% topic, since the steps to drawing the diagram is very systematic. When\r\n% things are very systematic, it's suitable for automation. And this is\r\n% what exactly Lateef did with this entry.\r\n% \r\n%   SFBM('Example',[20,5,20],{'CF',-2,0},{'M',10,8},{'DF',5,[1,3]},{'M',-10,12},{'DF',-4,[14,17]});\r\n%\r\n% <<potw_shear_moment_example.png>>\r\n%\r\n% You call the function by specifying the length of the beam and the\r\n% locations of the supports. Then you specify one by one the various types\r\n% of loads, namely \"point load\", \"moment\", and \"distributed load\", that are\r\n% placed on the beam. Let's decode the syntax above.\r\n%\r\n% * |[20,5,20]| - length of bar: 20m, support at 5m and 20m\r\n% * |{'CF',-2,0}| - point load of -2KN at 0m\r\n% * |{'M',10,8}| - moment of 10KNm at 8m\r\n% * |{'DF',5,[1,3]}| - distributed load of 5KN\/m from 1m to 3m\r\n% * |{'M',-10,12}| - moment of -10KNm at 12m\r\n% * |{'DF',-4,[14,17]}| - distributed load of -4KN\/m from 14m to 17m\r\n%\r\n% You can create an arbitrary linearly distributed load by simply changing\r\n% the 'DF' parameter.\r\n%\r\n%   SFBM('Example',[20 5 20],{'DF',[5 30],[7 15]})\r\n%\r\n% <<potw_linear_load.png>>\r\n%\r\n% By increasing the number of break points, you can describe a non-linearly\r\n% distributed load, expressed as a polynomial.\r\n%\r\n%   SFBM('Example',[20 5 20],{'DF',[0 25 30],[7 10 15]})\r\n%\r\n% <<potw_quadratic_load.png>>\r\n%\r\n% I also appreciate how active Lateef is in maintaining this File Exchange\r\n% entry. As you can see from the\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/51047#comment\r\n% comments> section, he has active conversations with his users, and he has\r\n% been updating the entry regularly. Thank you for your dedicated\r\n% contribution to the community, Lateef!\r\n%\r\n% *Comments*\r\n%\r\n% Give it a try and let us know what you think\r\n% <http:\/\/blogs.mathworks.com\/pick\/?p=10310#respond here> or leave a\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/51047#comment\r\n% comment> for Lateef.\r\n\r\n##### SOURCE END ##### 60af2ffc87ed4154a1094cc63614ca6c\r\n-->","protected":false},"excerpt":{"rendered":"<div class=\"overview-image\"><img decoding=\"async\"  class=\"img-responsive\" src=\"https:\/\/blogs.mathworks.com\/images\/pick\/jiro\/potw_sfbm\/potw_shear_moment_example.png\" onError=\"this.style.display ='none';\" \/><\/div><p>\r\nJiro&#8216;s pick this week is Shear Force Bending Moment by Lateef Adewale Kareem.As an ex-mechanical engineer, I remember my statics course where I learned how to do shear force bending moment&#8230; <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/pick\/2018\/11\/20\/drawing-shear-force-bending-moment-diagram\/\">read more >><\/a><\/p>","protected":false},"author":35,"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\/10310"}],"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\/35"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/comments?post=10310"}],"version-history":[{"count":3,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/10310\/revisions"}],"predecessor-version":[{"id":10318,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/10310\/revisions\/10318"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/media?parent=10310"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/categories?post=10310"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/tags?post=10310"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}