{"id":4817,"date":"2015-12-02T22:43:24","date_gmt":"2015-12-03T03:43:24","guid":{"rendered":"https:\/\/blogs.mathworks.com\/seth\/?p=4817"},"modified":"2015-12-02T22:43:24","modified_gmt":"2015-12-03T03:43:24","slug":"easily-accessing-block-parameters","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/simulink\/2015\/12\/02\/easily-accessing-block-parameters\/","title":{"rendered":"Easily Accessing Block Parameters"},"content":{"rendered":"<p>How often you end up wondering what the value of a block parameter in Simulink is?<\/p>\r\n\r\n<p><img decoding=\"async\" src=\"https:\/\/blogs.mathworks.com\/images\/seth\/2015Q4\/whatIsTheValue.png\" alt=\"What is the value of this parameter?\" \/><\/p>\r\n\r\n<p>In the past, I used to open the block dialog, copy the variable name, go the MATLAB prompt, paste the value and hit Enter to evaluate it.<\/p>\r\n\r\n<p>Since R2015a, we made it easier...<\/p>\r\n\r\n<p>If you right-click on a parameter in a block dialog, you now see two new options: Open and Explore.<\/p>\r\n\r\n<p><img decoding=\"async\" src=\"https:\/\/blogs.mathworks.com\/images\/seth\/2015Q4\/openOrExplore.png\" alt=\"Opening of Exploring a variable\" \/><\/p>\r\n\r\n<p><strong>Open Variable<\/strong><\/p>\r\n\r\n<p>If you select <strong>Open<\/strong>, for scalars and vectors, a simple dialog opens where you can view and edit the value of the parameter.<\/p>\r\n\r\n<p><img decoding=\"async\" src=\"https:\/\/blogs.mathworks.com\/images\/seth\/2015Q4\/openVariable.png\" alt=\"Open Variable\" \/><\/p>\r\n\r\n<p>If If the parameter is an object, for example a <a title=\"https:\/\/www.mathworks.com\/help\/simulink\/slref\/simulink.parameter.html (link no longer works)\">Simulink.Parameter<\/a> object, the standard properties dialog will open.<\/p>\r\n\r\n<p><img decoding=\"async\" src=\"https:\/\/blogs.mathworks.com\/images\/seth\/2015Q4\/openObject.png\" alt=\"Open Simulink.Parameter\" \/><\/p>\r\n\r\n\r\n<P><strong>Explore Variable<\/strong><\/p>\r\n\r\n<p>If you need to do more advanced maneuvers or see and edit more complex variables, like a structure, try clicking <strong>Explore<\/strong>. This will launch the <a title=\"https:\/\/www.mathworks.com\/help\/simulink\/ug\/the-model-explorer-overview.html (link no longer works)\">Model Explorer<\/a> with the variable selected.<\/p>\r\n\r\n<p><img decoding=\"async\" src=\"https:\/\/blogs.mathworks.com\/images\/seth\/2015Q4\/exploreVariable.png\" alt=\"Explore Variable\" \/><\/p>\r\n\r\n<p><strong>Now it's your turn<\/strong><\/p>\r\n\r\n<p>Have you already included this new feature in your workflow? Let us know what you think of it by leaving a <a href=\"https:\/\/blogs.mathworks.com\/seth\/?p=4817&#comment\">comment here<\/a>.<\/p>\r\n\r\n\r\n\r\n","protected":false},"excerpt":{"rendered":"<div class=\"overview-image\"><img decoding=\"async\"  class=\"img-responsive\" src=\"https:\/\/blogs.mathworks.com\/images\/seth\/2015Q4\/exploreVariable.png\" onError=\"this.style.display ='none';\" \/><\/div><p>How often you end up wondering what the value of a block parameter in Simulink is?\r\n\r\n\r\n\r\nIn the past, I used to open the block dialog, copy the variable name, go the MATLAB prompt, paste the value... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/simulink\/2015\/12\/02\/easily-accessing-block-parameters\/\">read more >><\/a><\/p>","protected":false},"author":41,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[69,33],"tags":[464],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/simulink\/wp-json\/wp\/v2\/posts\/4817"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/simulink\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/simulink\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/simulink\/wp-json\/wp\/v2\/users\/41"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/simulink\/wp-json\/wp\/v2\/comments?post=4817"}],"version-history":[{"count":8,"href":"https:\/\/blogs.mathworks.com\/simulink\/wp-json\/wp\/v2\/posts\/4817\/revisions"}],"predecessor-version":[{"id":4955,"href":"https:\/\/blogs.mathworks.com\/simulink\/wp-json\/wp\/v2\/posts\/4817\/revisions\/4955"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/simulink\/wp-json\/wp\/v2\/media?parent=4817"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/simulink\/wp-json\/wp\/v2\/categories?post=4817"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/simulink\/wp-json\/wp\/v2\/tags?post=4817"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}