{"id":2043,"date":"2024-07-22T09:41:11","date_gmt":"2024-07-22T09:41:11","guid":{"rendered":"https:\/\/britainwriters.com\/answers\/?p=2043"},"modified":"2024-07-22T09:41:14","modified_gmt":"2024-07-22T09:41:14","slug":"programming-for-engineers-matlab-assignment","status":"publish","type":"post","link":"https:\/\/britainwriters.com\/answers\/programming-for-engineers-matlab-assignment\/","title":{"rendered":"Programming For Engineers MATLAB Assignment"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\"><strong>Assignment Task<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">1. Write a program (script) that asks the user to enter the score of coursework (between 0 and 100). The program should then display this score and the corresponding grade found according to<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.unilearno.com\/uploads\/2024\/07\/20240719111053AM-61776332-1563936005.PNG\" alt=\"20240719111053AM-61776332-1563936005.PNG\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">2. The number \u03c0 can be approximated by the following series,<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.unilearno.com\/uploads\/2024\/07\/20240719111053AM-1404878184-726033989.PNG\" alt=\"20240719111053AM-1404878184-726033989.PNG\"\/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Write a program (script) that uses a while loop to evaluate the above series and calculates the value of \u03c0. To terminate the loop, use the condition that the next term to be evaluated in the series is less than or equal to 1 \u00d7 10\u22126.<\/li>\n\n\n\n<li>Your program should save all the estimates of \u03c0 in a variable called \u2018 pie \u2019 and then plot the first 100<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">3. Write a Matlab function which takes as an input two numbers a and b, and checks whether the digits of b can be rearranged to give a (or vice versa). For example, the digits of numbers 123 and 321 can be rearranged to give the same number. The function should produce as an output a single variable with a value of 1 when the the rearrangement is possible and 0 when it is not. HINT: consider converting your number to a string to identify each digit of the number.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">4. Write a function which takes as an input an array of numbers, and then produces another array which has the numbers mixed according to the following:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>If the size of the array is even, then the function separates the array into two equal parts, and then interleaves the two parts.<\/li>\n\n\n\n<li>If the size of the array is odd, then it separates the array into two parts of size (n+1)\/2 and (n-1)\/2, where n is the size of the array, and then interleaves the two parts. As an example, consider you are given the array containing 5 numbers: 1 2 3 4 5, then the result of the mixing will be: 1 4 2 5 3 Please consider that the input will be a row or column array (and not a matrix).\u00a0<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">5. Your code will receive an additional [10%] of discretionary marks relating to coding style, comments, structure of code and efficiency. Programs with no comments will receive 20% less than what would normally be awarded.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Assignment Task 1. Write a program (script) that asks the user to enter the score of coursework (between 0 and 100). The program should then display this score and the corresponding grade found according to 2. The number \u03c0 can be approximated by the following series, 3. Write a Matlab function which takes as an [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2043","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Programming For Engineers MATLAB Assignment - My Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/britainwriters.com\/answers\/programming-for-engineers-matlab-assignment\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Programming For Engineers MATLAB Assignment - My Blog\" \/>\n<meta property=\"og:description\" content=\"Assignment Task 1. Write a program (script) that asks the user to enter the score of coursework (between 0 and 100). The program should then display this score and the corresponding grade found according to 2. The number \u03c0 can be approximated by the following series, 3. Write a Matlab function which takes as an [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/britainwriters.com\/answers\/programming-for-engineers-matlab-assignment\/\" \/>\n<meta property=\"og:site_name\" content=\"My Blog\" \/>\n<meta property=\"article:published_time\" content=\"2024-07-22T09:41:11+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-07-22T09:41:14+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.unilearno.com\/uploads\/2024\/07\/20240719111053AM-61776332-1563936005.PNG\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/britainwriters.com\\\/answers\\\/programming-for-engineers-matlab-assignment\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/britainwriters.com\\\/answers\\\/programming-for-engineers-matlab-assignment\\\/\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\\\/\\\/britainwriters.com\\\/answers\\\/#\\\/schema\\\/person\\\/c698e0f0b4a723b0d250ea199e68a6d3\"},\"headline\":\"Programming For Engineers MATLAB Assignment\",\"datePublished\":\"2024-07-22T09:41:11+00:00\",\"dateModified\":\"2024-07-22T09:41:14+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/britainwriters.com\\\/answers\\\/programming-for-engineers-matlab-assignment\\\/\"},\"wordCount\":343,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/britainwriters.com\\\/answers\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/britainwriters.com\\\/answers\\\/programming-for-engineers-matlab-assignment\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.unilearno.com\\\/uploads\\\/2024\\\/07\\\/20240719111053AM-61776332-1563936005.PNG\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/britainwriters.com\\\/answers\\\/programming-for-engineers-matlab-assignment\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/britainwriters.com\\\/answers\\\/programming-for-engineers-matlab-assignment\\\/\",\"url\":\"https:\\\/\\\/britainwriters.com\\\/answers\\\/programming-for-engineers-matlab-assignment\\\/\",\"name\":\"Programming For Engineers MATLAB Assignment - My Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/britainwriters.com\\\/answers\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/britainwriters.com\\\/answers\\\/programming-for-engineers-matlab-assignment\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/britainwriters.com\\\/answers\\\/programming-for-engineers-matlab-assignment\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.unilearno.com\\\/uploads\\\/2024\\\/07\\\/20240719111053AM-61776332-1563936005.PNG\",\"datePublished\":\"2024-07-22T09:41:11+00:00\",\"dateModified\":\"2024-07-22T09:41:14+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/britainwriters.com\\\/answers\\\/programming-for-engineers-matlab-assignment\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/britainwriters.com\\\/answers\\\/programming-for-engineers-matlab-assignment\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/britainwriters.com\\\/answers\\\/programming-for-engineers-matlab-assignment\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.unilearno.com\\\/uploads\\\/2024\\\/07\\\/20240719111053AM-61776332-1563936005.PNG\",\"contentUrl\":\"https:\\\/\\\/www.unilearno.com\\\/uploads\\\/2024\\\/07\\\/20240719111053AM-61776332-1563936005.PNG\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/britainwriters.com\\\/answers\\\/programming-for-engineers-matlab-assignment\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/britainwriters.com\\\/answers\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Programming For Engineers MATLAB Assignment\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/britainwriters.com\\\/answers\\\/#website\",\"url\":\"https:\\\/\\\/britainwriters.com\\\/answers\\\/\",\"name\":\"My Blog\",\"description\":\"My WordPress Blog\",\"publisher\":{\"@id\":\"https:\\\/\\\/britainwriters.com\\\/answers\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/britainwriters.com\\\/answers\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/britainwriters.com\\\/answers\\\/#organization\",\"name\":\"My Blog\",\"url\":\"https:\\\/\\\/britainwriters.com\\\/answers\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/britainwriters.com\\\/answers\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/britainwriters.com\\\/answers\\\/wp-content\\\/uploads\\\/2023\\\/12\\\/bw-logo.png\",\"contentUrl\":\"https:\\\/\\\/britainwriters.com\\\/answers\\\/wp-content\\\/uploads\\\/2023\\\/12\\\/bw-logo.png\",\"width\":379,\"height\":81,\"caption\":\"My Blog\"},\"image\":{\"@id\":\"https:\\\/\\\/britainwriters.com\\\/answers\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/britainwriters.com\\\/answers\\\/#\\\/schema\\\/person\\\/c698e0f0b4a723b0d250ea199e68a6d3\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9c8389b9a2505b8a25de6eb6bd63d1b3bd34e49d8d91d40d9935e77bdb797c34?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9c8389b9a2505b8a25de6eb6bd63d1b3bd34e49d8d91d40d9935e77bdb797c34?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9c8389b9a2505b8a25de6eb6bd63d1b3bd34e49d8d91d40d9935e77bdb797c34?s=96&d=mm&r=g\",\"caption\":\"admin\"},\"sameAs\":[\"https:\\\/\\\/britainwriters.com\\\/website\"],\"url\":\"https:\\\/\\\/britainwriters.com\\\/answers\\\/author\\\/admin\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Programming For Engineers MATLAB Assignment - My Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/britainwriters.com\/answers\/programming-for-engineers-matlab-assignment\/","og_locale":"en_US","og_type":"article","og_title":"Programming For Engineers MATLAB Assignment - My Blog","og_description":"Assignment Task 1. Write a program (script) that asks the user to enter the score of coursework (between 0 and 100). The program should then display this score and the corresponding grade found according to 2. The number \u03c0 can be approximated by the following series, 3. Write a Matlab function which takes as an [&hellip;]","og_url":"https:\/\/britainwriters.com\/answers\/programming-for-engineers-matlab-assignment\/","og_site_name":"My Blog","article_published_time":"2024-07-22T09:41:11+00:00","article_modified_time":"2024-07-22T09:41:14+00:00","og_image":[{"url":"https:\/\/www.unilearno.com\/uploads\/2024\/07\/20240719111053AM-61776332-1563936005.PNG","type":"","width":"","height":""}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/britainwriters.com\/answers\/programming-for-engineers-matlab-assignment\/#article","isPartOf":{"@id":"https:\/\/britainwriters.com\/answers\/programming-for-engineers-matlab-assignment\/"},"author":{"name":"admin","@id":"https:\/\/britainwriters.com\/answers\/#\/schema\/person\/c698e0f0b4a723b0d250ea199e68a6d3"},"headline":"Programming For Engineers MATLAB Assignment","datePublished":"2024-07-22T09:41:11+00:00","dateModified":"2024-07-22T09:41:14+00:00","mainEntityOfPage":{"@id":"https:\/\/britainwriters.com\/answers\/programming-for-engineers-matlab-assignment\/"},"wordCount":343,"commentCount":0,"publisher":{"@id":"https:\/\/britainwriters.com\/answers\/#organization"},"image":{"@id":"https:\/\/britainwriters.com\/answers\/programming-for-engineers-matlab-assignment\/#primaryimage"},"thumbnailUrl":"https:\/\/www.unilearno.com\/uploads\/2024\/07\/20240719111053AM-61776332-1563936005.PNG","inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/britainwriters.com\/answers\/programming-for-engineers-matlab-assignment\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/britainwriters.com\/answers\/programming-for-engineers-matlab-assignment\/","url":"https:\/\/britainwriters.com\/answers\/programming-for-engineers-matlab-assignment\/","name":"Programming For Engineers MATLAB Assignment - My Blog","isPartOf":{"@id":"https:\/\/britainwriters.com\/answers\/#website"},"primaryImageOfPage":{"@id":"https:\/\/britainwriters.com\/answers\/programming-for-engineers-matlab-assignment\/#primaryimage"},"image":{"@id":"https:\/\/britainwriters.com\/answers\/programming-for-engineers-matlab-assignment\/#primaryimage"},"thumbnailUrl":"https:\/\/www.unilearno.com\/uploads\/2024\/07\/20240719111053AM-61776332-1563936005.PNG","datePublished":"2024-07-22T09:41:11+00:00","dateModified":"2024-07-22T09:41:14+00:00","breadcrumb":{"@id":"https:\/\/britainwriters.com\/answers\/programming-for-engineers-matlab-assignment\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/britainwriters.com\/answers\/programming-for-engineers-matlab-assignment\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/britainwriters.com\/answers\/programming-for-engineers-matlab-assignment\/#primaryimage","url":"https:\/\/www.unilearno.com\/uploads\/2024\/07\/20240719111053AM-61776332-1563936005.PNG","contentUrl":"https:\/\/www.unilearno.com\/uploads\/2024\/07\/20240719111053AM-61776332-1563936005.PNG"},{"@type":"BreadcrumbList","@id":"https:\/\/britainwriters.com\/answers\/programming-for-engineers-matlab-assignment\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/britainwriters.com\/answers\/"},{"@type":"ListItem","position":2,"name":"Programming For Engineers MATLAB Assignment"}]},{"@type":"WebSite","@id":"https:\/\/britainwriters.com\/answers\/#website","url":"https:\/\/britainwriters.com\/answers\/","name":"My Blog","description":"My WordPress Blog","publisher":{"@id":"https:\/\/britainwriters.com\/answers\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/britainwriters.com\/answers\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/britainwriters.com\/answers\/#organization","name":"My Blog","url":"https:\/\/britainwriters.com\/answers\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/britainwriters.com\/answers\/#\/schema\/logo\/image\/","url":"https:\/\/britainwriters.com\/answers\/wp-content\/uploads\/2023\/12\/bw-logo.png","contentUrl":"https:\/\/britainwriters.com\/answers\/wp-content\/uploads\/2023\/12\/bw-logo.png","width":379,"height":81,"caption":"My Blog"},"image":{"@id":"https:\/\/britainwriters.com\/answers\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/britainwriters.com\/answers\/#\/schema\/person\/c698e0f0b4a723b0d250ea199e68a6d3","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/9c8389b9a2505b8a25de6eb6bd63d1b3bd34e49d8d91d40d9935e77bdb797c34?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/9c8389b9a2505b8a25de6eb6bd63d1b3bd34e49d8d91d40d9935e77bdb797c34?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/9c8389b9a2505b8a25de6eb6bd63d1b3bd34e49d8d91d40d9935e77bdb797c34?s=96&d=mm&r=g","caption":"admin"},"sameAs":["https:\/\/britainwriters.com\/website"],"url":"https:\/\/britainwriters.com\/answers\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/britainwriters.com\/answers\/wp-json\/wp\/v2\/posts\/2043","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/britainwriters.com\/answers\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/britainwriters.com\/answers\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/britainwriters.com\/answers\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/britainwriters.com\/answers\/wp-json\/wp\/v2\/comments?post=2043"}],"version-history":[{"count":1,"href":"https:\/\/britainwriters.com\/answers\/wp-json\/wp\/v2\/posts\/2043\/revisions"}],"predecessor-version":[{"id":2044,"href":"https:\/\/britainwriters.com\/answers\/wp-json\/wp\/v2\/posts\/2043\/revisions\/2044"}],"wp:attachment":[{"href":"https:\/\/britainwriters.com\/answers\/wp-json\/wp\/v2\/media?parent=2043"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/britainwriters.com\/answers\/wp-json\/wp\/v2\/categories?post=2043"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/britainwriters.com\/answers\/wp-json\/wp\/v2\/tags?post=2043"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}