{"id":2923,"date":"2011-08-12T12:50:51","date_gmt":"2011-08-12T12:50:51","guid":{"rendered":"https:\/\/blogs.mathworks.com\/pick\/2011\/08\/12\/automatically-size-and-connect-blocks\/"},"modified":"2017-01-06T21:32:21","modified_gmt":"2017-01-07T02:32:21","slug":"automatically-size-and-connect-blocks","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/pick\/2011\/08\/12\/automatically-size-and-connect-blocks\/","title":{"rendered":"Automatically size and connect blocks"},"content":{"rendered":"<p><a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/authors\/62957\">Doug's<\/a> pick this week is <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/31576-autosizeonconnect\">AutoSizeOnConnect<\/a> by <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/authors\/35643\">Mike Anthony<\/a>.<\/p>\r\n\r\n<p>I love the fact that Simulink provides a graphical view of the system being modeled, but being a stickler for clean looking models, I sometimes find myself spending time cleaning up lines, resizing blocks, and other graphical tweaks that aren't related to actually solving the problem I'm working on.<\/p>\r\n\r\n<p>That's why I like my colleague Mike's simple tool that saves some time by automatically updating the number of ports and resizing blocks like <a href=\"https:\/\/www.mathworks.com\/help\/releases\/R2011a\/toolbox\/simulink\/slref\/mux.html\">mux <\/a>and <a href=\"https:\/\/www.mathworks.com\/help\/releases\/R2011a\/toolbox\/simulink\/slref\/demux.html\">demux<\/a> to quickly provide a clean connection to upstream or downstream blocks. After downloading and installing the code, you simply select the the blocks you want to connect to, right-click and choose AutoSizeOnConnect from the context menu, then click the mux or demux block. The result is a nice clean connection:<\/p>\r\n\r\n<p>I also picked this entry because I think it's a great example of how you can <a href=\"https:\/\/www.mathworks.com\/help\/releases\/R2011a\/toolbox\/simulink\/ug\/bqt2_on.html\">customize the Simulink user interface<\/a> to help streamline your workflow. Thanks Mike!<\/p>\r\n\r\n<p>Give it a try and let us know what you think <a href=\"https:\/\/blogs.mathworks.com\/pick\/?p=2923#respond\">here<\/a> or leave a <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/31576-autosizeonconnect#comment\">comment<\/a> for Mike.<\/p>\r\n\r\n","protected":false},"excerpt":{"rendered":"<p>Doug's pick this week is AutoSizeOnConnect by Mike Anthony.\r\n\r\nI love the fact that Simulink provides a graphical view of the system being modeled, but being a stickler for clean looking models, I... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/pick\/2011\/08\/12\/automatically-size-and-connect-blocks\/\">read more >><\/a><\/p>","protected":false},"author":36,"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\/2923"}],"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\/36"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/comments?post=2923"}],"version-history":[{"count":1,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/2923\/revisions"}],"predecessor-version":[{"id":8340,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/2923\/revisions\/8340"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/media?parent=2923"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/categories?post=2923"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/tags?post=2923"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}