{"id":222,"date":"2007-11-15T14:57:29","date_gmt":"2007-11-15T19:57:29","guid":{"rendered":"https:\/\/blogs.mathworks.com\/videos\/2007\/11\/15\/practical-example-algorithm-development-for-making-colormaps\/"},"modified":"2016-04-04T15:17:25","modified_gmt":"2016-04-04T20:17:25","slug":"practical-example-algorithm-development-for-making-colormaps","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/videos\/2007\/11\/15\/practical-example-algorithm-development-for-making-colormaps\/","title":{"rendered":"Practical example: Algorithm development for making colormaps"},"content":{"rendered":"In a recent post, I mentioned <a href=\"https:\/\/blogs.mathworks.com\/pick\/2007\/11\/13\/lazyweb-on-the-file-exchange\/\">LazyWeb<\/a> It worked better than I expected. Matt <a title=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/loadFile.do?objectId=17505&amp;objectType=FILE (link no longer works)\">posted some code<\/a> that I requested that will highlight a line when you click on it. This works exactly as hoped. Thanks Matt, your MATLAB T-shirt has been shipped to thank you for your effort.\r\n\r\nNed thought this was great, so he <a href=\"https:\/\/blogs.mathworks.com\/pick\/2007\/11\/13\/lazyweb-on-the-file-exchange\/#comments\">posted a request<\/a> for some code that makes colormaps.\r\n\r\nI took up the challenge, mostly so that I could record how I went about developing an algorithm.\r\n\r\nI broke this into two videos:\r\n\r\nIn this first video you will see:\r\n<ul>\r\n\t<li>The colormaps that we are developing from a journal article<\/li>\r\n\t<li>The colormap applied to a MATLAB figure<\/li>\r\n\t<li>How to call the code to make the colormap<\/li>\r\n\t<li>Explaining the structure of a colormap in MATLAB<\/li>\r\n\t<li>Exploring colormaps in the colormap editor<\/li>\r\n\t<li>Plotting a colormap to understand its structure<\/li>\r\n\t<li>Creating the colormap creating subfunction<\/li>\r\n\t<li>Testing the subfunction<\/li>\r\n<\/ul>\r\n<div><div class=\"row\"><div class=\"col-xs-12 containing-block\"><div class=\"bc-outer-container add_margin_20\"><videoplayer><div class=\"video-js-container\"><video data-video-id=\"3908236623001\" data-video-category=\"blog\" data-autostart=\"false\" data-account=\"62009828001\" data-omniture-account=\"mathwgbl\" data-player=\"rJ9XCz2Sx\" data-embed=\"default\" id=\"mathworks-brightcove-player\" class=\"video-js\" controls><\/video><script src=\"\/\/players.brightcove.net\/62009828001\/rJ9XCz2Sx_default\/index.min.js\"><\/script><script>if (typeof(playerLoaded) === 'undefined') {var playerLoaded = false;}(function isVideojsDefined() {if (typeof(videojs) !== 'undefined') {videojs(\"mathworks-brightcove-player\").on('loadedmetadata', function() {playerLoaded = true;});} else {setTimeout(isVideojsDefined, 10);}})();<\/script><\/div><\/videoplayer><\/div><\/div><\/div><\/div>\r\nIn this second video you will see:\r\n<ul>\r\n\t<li>We review the colormaps that are to be made.<\/li>\r\n\t<li>Show the four expected calling syntaxes for the function<\/li>\r\n\t<li>Show how to use VARARGIN to make deal with different numbers of input arguments<\/li>\r\n\t<li>Show error catching<\/li>\r\n\t<li>Show different branches of code to be followed based on inputs<\/li>\r\n\t<li>Developing an algorithm with cell mode to test an algorithm<\/li>\r\n\t<li>Testing<\/li>\r\n\t<li>Documentation<\/li>\r\n<\/ul>\r\n<div><div class=\"row\"><div class=\"col-xs-12 containing-block\"><div class=\"bc-outer-container add_margin_20\"><videoplayer><div class=\"video-js-container\"><video data-video-id=\"3908236625001\" data-video-category=\"blog\" data-autostart=\"false\" data-account=\"62009828001\" data-omniture-account=\"mathwgbl\" data-player=\"rJ9XCz2Sx\" data-embed=\"default\" id=\"mathworks-brightcove-player\" class=\"video-js\" controls><\/video><script src=\"\/\/players.brightcove.net\/62009828001\/rJ9XCz2Sx_default\/index.min.js\"><\/script><script>if (typeof(playerLoaded) === 'undefined') {var playerLoaded = false;}(function isVideojsDefined() {if (typeof(videojs) !== 'undefined') {videojs(\"mathworks-brightcove-player\").on('loadedmetadata', function() {playerLoaded = true;});} else {setTimeout(isVideojsDefined, 10);}})();<\/script><\/div><\/videoplayer><\/div><\/div><\/div><\/div>\r\nThis code was written live, so mistakes were made along the way. This gives you a realistic view of how a MATLAB expert deals with the inevitable errors that occur while programming.\r\n\r\nOther videos have been gathered here:\r\n<a href=\"https:\/\/blogs.mathworks.com\/pick\/category\/video\/\">https:\/\/blogs.mathworks.com\/pick\/category\/video\/<\/a>\r\n\r\nPractical example videos have been gathered here:\r\n<a href=\"https:\/\/blogs.mathworks.com\/pick\/category\/practical-example\">https:\/\/blogs.mathworks.com\/pick\/category\/practical-example<\/a>","protected":false},"excerpt":{"rendered":"<div class=\"thumbnail thumbnail_asset asset_overlay video\"><a href=\"https:\/\/blogs.mathworks.com\/videos\/2007\/11\/15\/practical-example-algorithm-development-for-making-colormaps\/?dir=autoplay\"><img decoding=\"async\" src=\"https:\/\/cf-images.us-east-1.prod.boltdns.net\/v1\/static\/62009828001\/09ec0bea-e87a-44bf-ae14-d3c4586aef3a\/baa3535d-7da3-4353-874a-254ceff85bb8\/160x90\/match\/image.jpg\" onError=\"this.style.display ='none';\"\/>\n      <div class=\"overlay_container\">\n      <span class=\"icon-video icon_color_null\"><time class=\"video_length\">9:29<\/time><\/span>\n      <\/div>\n      <\/a><\/div><p>In a recent post, I mentioned LazyWeb It worked better than I expected. Matt posted some code that I requested that will highlight a line when you click on it. This works exactly as hoped. Thanks&#8230; <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/videos\/2007\/11\/15\/practical-example-algorithm-development-for-making-colormaps\/\">read more >><\/a><\/p>","protected":false},"author":68,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[19,4,20],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/posts\/222"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/users\/68"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/comments?post=222"}],"version-history":[{"count":1,"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/posts\/222\/revisions"}],"predecessor-version":[{"id":2138,"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/posts\/222\/revisions\/2138"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/media?parent=222"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/categories?post=222"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/tags?post=222"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}