{"id":21478372,"url":"https://github.com/mathworks-teaching-resources/programming-a-starter-project-using-matlab-and-python","last_synced_at":"2025-07-19T09:34:30.503Z","repository":{"id":56863093,"uuid":"526598049","full_name":"MathWorks-Teaching-Resources/Programming-A-Starter-Project-Using-MATLAB-and-Python","owner":"MathWorks-Teaching-Resources","description":"A scaffolded project involving pulling and installing a Live Task and using MATLAB and Python in combination to access and analyze data from the OpenWeather web API.","archived":false,"fork":false,"pushed_at":"2024-10-30T21:17:21.000Z","size":8588,"stargazers_count":24,"open_issues_count":1,"forks_count":5,"subscribers_count":4,"default_branch":"release","last_synced_at":"2024-10-30T22:19:02.049Z","etag":null,"topics":["api","app","courseware","create-app","cwm","matlab","matlab-live-script","multiple-languages","programming","python"],"latest_commit_sha":null,"homepage":"","language":"MATLAB","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MathWorks-Teaching-Resources.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-19T12:26:57.000Z","updated_at":"2024-10-30T21:17:25.000Z","dependencies_parsed_at":"2023-02-15T13:16:02.723Z","dependency_job_id":"f0c4aabc-2cc6-467f-8a44-83bd5ab3bfae","html_url":"https://github.com/MathWorks-Teaching-Resources/Programming-A-Starter-Project-Using-MATLAB-and-Python","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MathWorks-Teaching-Resources%2FProgramming-A-Starter-Project-Using-MATLAB-and-Python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MathWorks-Teaching-Resources%2FProgramming-A-Starter-Project-Using-MATLAB-and-Python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MathWorks-Teaching-Resources%2FProgramming-A-Starter-Project-Using-MATLAB-and-Python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MathWorks-Teaching-Resources%2FProgramming-A-Starter-Project-Using-MATLAB-and-Python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MathWorks-Teaching-Resources","download_url":"https://codeload.github.com/MathWorks-Teaching-Resources/Programming-A-Starter-Project-Using-MATLAB-and-Python/tar.gz/refs/heads/release","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226033442,"owners_count":17563166,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","app","courseware","create-app","cwm","matlab","matlab-live-script","multiple-languages","programming","python"],"created_at":"2024-11-23T11:17:53.321Z","updated_at":"2024-11-23T11:17:53.947Z","avatar_url":"https://github.com/MathWorks-Teaching-Resources.png","language":"MATLAB","readme":"\n# \u003cspan style=\"color:rgb(213,80,0)\"\u003eProgramming: A Starter Project Using MATLAB with Python\u003c/span\u003e\n\n\n[![View on File Exchange](https://www.mathworks.com/matlabcentral/images/matlab-file-exchange.svg)](https://www.mathworks.com/matlabcentral/fileexchange/116490-programming-a-starter-project-using-matlab-and-python) or [![Open in MATLAB Online](https://www.mathworks.com/images/responsive/global/open-in-matlab-online.svg)](https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Programming-A-Starter-Project-Using-MATLAB-and-Python\u0026project=MATLABwithPython.prj\u0026file=README.mlx)\n\n[![MATLAB Versions Tested](https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2FMathWorks-Teaching-Resources%2FProgramming-A-Starter-Project-Using-MATLAB-and-Python%2Frelease%2FImages%2FTestedWith.json)](https://MathWorks-Teaching-Resources.github.io/Programming-A-Starter-Project-Using-MATLAB-and-Python)\n\n**Curriculum Module**\n\n_Created with R2024a. Compatible with R2024a and later releases._\n\n# Information\n\nThis curriculum module contains interactive [MATLAB® live scripts](https://www.mathworks.com/products/matlab/live-editor.html) that teach fundamental concepts and basic terminology related to programming computers. \n\n# Prerequisite Domain Knowledge\n\nThis module assumes familiarity with basic programming concepts such as variables, data types, and functions, structures including arrays and structs, and control flows including if/else as well as how to use them in MATLAB. These ideas are all presented with interactive examples in [\u003cu\u003eFundamentals of Programming\u003c/u\u003e](https://www.mathworks.com/matlabcentral/fileexchange/103225-fundamentals-of-programming), [\u003cu\u003eProgramming: Organizing Data\u003c/u\u003e](https://www.mathworks.com/matlabcentral/fileexchange/115900-programming-organizing-data), [\u003cu\u003eProgramming: Structuring Code\u003c/u\u003e](https://www.mathworks.com/matlabcentral/fileexchange/115905-programming-structuring-code).\n\n\n## Background\n\nYou can use these live scripts as demonstrations in lectures, class activities, or interactive assignments outside class. This module explores interactions between systems by using the OpenWeather API and calling into Python from MATLAB. **Programming: A Starter Project Using MATLAB with Python** covers using the Run Python Code Live Task to run provided Python code, accessing the OpenWeather API to check the weather, extracting useful data from the API call, and using App Designer to create an app with a personalized weather display.\n\n\nThe instructions inside the live scripts will guide you through the exercises and activities. Get started with each live script by running it one section at a time. To stop running the script or a section midway (for example, when an animation is in progress), use the \u003cimg src=\"Images/EndIcon.png\" width=\"19\" alt=\"EndIcon.png\"\u003e Stop button in the **RUN** section of the **Live Editor** tab in the MATLAB Toolstrip.\n\n## Contact Us\n\nSolutions are available upon instructor request. Contact the [MathWorks teaching resources team](mailto:onlineteaching@mathworks.com) if you would like to request solutions, provide feedback, or if you have a question.\n\n\n## Prerequisites\n\nThis module assumes familiarity with basic programming concepts such as variables, data types, and functions, structures including arrays and structs, and control flows including if/else as well as how to use them in MATLAB. These ideas are all presented with interactive examples in [\u003cu\u003eFundamentals of Programming\u003c/u\u003e](https://github.com/MathWorks-Teaching-Resources/Fundamentals-of-Programming), [\u003cu\u003eProgramming: Organizing Data\u003c/u\u003e](https://github.com/MathWorks-Teaching-Resources/Programming-Organizing-Data), [\u003cu\u003eProgramming: Structuring Code\u003c/u\u003e](https://github.com/MathWorks-Teaching-Resources/Programming-Structuring-Code).\n\n\n## Getting Started\n### Accessing the Module\n### **On MATLAB Online:**\n\nUse the [\u003cimg src=\"Images/OpenInMO.png\" width=\"136\" alt=\"OpenInMO.png\"\u003e](https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Programming-A-Starter-Project-Using-MATLAB-and-Python\u0026project=MATLABwithPython.prj) link to download the module. You will be prompted to log in or create a MathWorks account. The project will be loaded, and you will see an app with several navigation options to get you started.\n\n### **On Desktop:**\n\nDownload or clone this repository. Open MATLAB, navigate to the folder containing these scripts and double\\-click on [MATLABwithPython.prj](https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Programming-A-Starter-Project-Using-MATLAB-and-Python\u0026project=MATLABwithPython.prj\u0026file=README.mlx). It will add the appropriate files to your MATLAB path and open an app that asks you where you would like to start. \n\n\nEnsure you have all the required products (listed below) installed. If you need to include a product, add it using the Add\\-On Explorer. To install an add\\-on, go to the **Home** tab and select  \u003cimg src=\"Images/AddOnsIcon.png\" width=\"16\" alt=\"AddOnsIcon.png\"\u003e **Add-Ons** \u003e **Get Add-Ons**. \n\n\n## Products\n\nMATLAB® is used throughout. Tools from the Symbolic Math Toolbox™ are used to convert between different unit systems in the weather applications.\n\n# Scripts\n## [**UsingMATLABwithPython.mlx**](https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Programming-A-Starter-Project-Using-MATLAB-and-Python\u0026project=MATLABwithPython.prj\u0026file=Scripts/UsingMATLABwithPython.mlx) \n|      |      |\n| :-- | :-- |\n| **Introductory script** \u003cbr\u003e  | **In this script, students will...** \u003cbr\u003e   |\n| \u003cimg src=\"Images/RunPythonLiveTask.png\" width=\"171\" alt=\"RunPythonLiveTask.png\"\u003e \u003cbr\u003e  | $\\bullet$ check that an appropriate version of Python is installed and visible within MATLAB \u003cbr\u003e $\\bullet$ explore the Run Python Code Live Task \u003cbr\u003e $\\bullet$ try running Python commands and a Python script from MATLAB \u003cbr\u003e   |\n|      |       |\n\n## [**CheckingTheWeather.mlx**](https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Programming-A-Starter-Project-Using-MATLAB-and-Python\u0026project=MATLABwithPython.prj\u0026file=Scripts/CheckingTheWeather.mlx) \n|      |      |\n| :-- | :-- |\n| **Investigatory script** \u003cbr\u003e  | **In this script, students will...** \u003cbr\u003e   |\n| \u003cimg src=\"Images/WeatherStruct.png\" width=\"171\" alt=\"WeatherStruct.png\"\u003e \u003cbr\u003e  | $\\bullet$ set up an account with OpenWeather to create your own API key \u003cbr\u003e $\\bullet$ use existing Python code to make an API call to OpenWeather \u003cbr\u003e $\\bullet$ use MATLAB to explore the data returned by the API call, including data type conversions and unit conversions \u003cbr\u003e   |\n|      |       |\n\n## [**CreateCurrentWeatherApp.mlx**](https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Programming-A-Starter-Project-Using-MATLAB-and-Python\u0026project=MATLABwithPython.prj\u0026file=Scripts/CreateCurrentWeatherApp.mlx) \n|      |      |\n| :-- | :-- |\n| **Application script** \u003cbr\u003e  | **In this script, students will...** \u003cbr\u003e   |\n| \u003cimg src=\"Images/WeatherDashboard.png\" width=\"171\" alt=\"WeatherDashboard.png\"\u003e \u003cbr\u003e  | $\\bullet$ use App Designer to build a custom app using the code from CheckingTheWeather.mlx \u003cbr\u003e $\\bullet$ create callbacks, properties, and functions \u003cbr\u003e $\\bullet$ design and organize a UI with drag and drop elements \u003cbr\u003e $\\bullet$ reuse code from CheckingTheWeather in a new context \u003cbr\u003e   |\n|      |       |\n\n# Apps\n\nBoth of these apps require running Python from MATLAB, as set up in UsingMATLABwithPython and an OpenWeather API key, as set up in CheckingTheWeather.\n\n-  **\u003csamp\u003eCurrentWeatherAppDemo.mlapp\u003c/samp\u003e** shows the results of working through CreateCurrentWeatherApp.  \n-  **\u003csamp\u003eWeatherDisplay.mlapp\u003c/samp\u003e** shows one elaborated version of the basic current weather app.  \n\n# License\n\nThe license for this module is available in the [LICENSE.md](https://github.com/MathWorks-Teaching-Resources/Programming-A-Starter-Project-Using-MATLAB-and-Python/blob/release/LICENSE.md).\n\n# Related Courseware Modules\n|      |      |      |\n| :-- | :-- | :-- |\n| **Courseware Module** \u003cbr\u003e  | **Sample Content** \u003cbr\u003e  | **Available on:** \u003cbr\u003e   |\n| [**Fundamentals of Programming**](https://www.mathworks.com/matlabcentral/fileexchange/103225-fundamentals-of-programming)  \u003cbr\u003e Learn the basics of how to make a computer  \u003cbr\u003e accept, store, and compute with information \u003cbr\u003e  | \u003cimg src=\"Images/MouseThoughtBubble.png\" width=\"171\" alt=\"MouseThoughtBubble.png\"\u003e \u003cbr\u003e  | [\u003cimg src=\"Images/OpenInFX.png\" width=\"91\" alt=\"OpenInFX.png\"\u003e](https://www.mathworks.com/matlabcentral/fileexchange/103225-fundamentals-of-programming) \u003cbr\u003e [\u003cimg src=\"Images/OpenInMO.png\" width=\"136\" alt=\"OpenInMO.png\"\u003e](https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Fundamentals-of-Programming\u0026project=FundamentalsofProgramming.prj) \u003cbr\u003e [GitHub](https://github.com/MathWorks-Teaching-Resources/Fundamentals-of-Programming) \u003cbr\u003e   |\n| [**Programming: Structuring Code**](https://www.mathworks.com/matlabcentral/fileexchange/115905-programming-structuring-code) \u003cbr\u003e Learn how to organize your code into functions,  \u003cbr\u003e debug, comment, and share \u003cbr\u003e  | \u003cimg src=\"Images/RGBTurkeys.png\" width=\"171\" alt=\"RGBTurkeys.png\"\u003e \u003cbr\u003e  | [\u003cimg src=\"Images/OpenInFX.png\" width=\"91\" alt=\"OpenInFX.png\"\u003e](https://www.mathworks.com/matlabcentral/fileexchange/115905-programming-structuring-code) \u003cbr\u003e [\u003cimg src=\"Images/OpenInMO.png\" width=\"136\" alt=\"OpenInMO.png\"\u003e](https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Programming-Structuring-Code\u0026project=StructuringCode.prj) \u003cbr\u003e [GitHub](https://github.com/MathWorks-Teaching-Resources/Programming-Structuring-Code) \u003cbr\u003e   |\n| [**Programming: Organizing Data**](https://www.mathworks.com/matlabcentral/fileexchange/115900-programming-organizing-data) \u003cbr\u003e Learn more about strings, numeric data types,  \u003cbr\u003e memory, and ways of storing data \u003cbr\u003e  | \u003cimg src=\"Images/SeaSurfaceTemps.png\" width=\"171\" alt=\"SeaSurfaceTemps.png\"\u003e \u003cbr\u003e  | [\u003cimg src=\"Images/OpenInFX.png\" width=\"91\" alt=\"OpenInFX.png\"\u003e](https://www.mathworks.com/matlabcentral/fileexchange/115900-programming-organizing-data) \u003cbr\u003e [\u003cimg src=\"Images/OpenInMO.png\" width=\"136\" alt=\"OpenInMO.png\"\u003e](https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Programming-Organizing-Data\u0026project=OrganizingData.prj) \u003cbr\u003e [GitHub](https://github.com/MathWorks-Teaching-Resources/Programming-Organizing-Data) \u003cbr\u003e   |\n|      |      |       |\n\n\nOr feel free to explore our other [modular courseware content](https://www.mathworks.com/matlabcentral/fileexchange/?q=tag%3A%22courseware+module%22\u0026sort=downloads_desc_30d).\n\n# Educator Resources\n-  [Educator Page](https://www.mathworks.com/academia/educators.html) \n\n# Contribute \n\nLooking for more? Find an issue? Have a suggestion? Please contact the [MathWorks teaching resources team](mailto:%20onlineteaching@mathworks.com). If you want to contribute directly to this project, you can find information about how to do so in the [CONTRIBUTING.md](https://github.com/MathWorks-Teaching-Resources/Programming-A-Starter-Project-Using-MATLAB-and-Python/blob/release/CONTRIBUTING.md) page on GitHub.\n\n# Acknowledgments\n\nMany thanks to Blake Naccarato on his suggestions for improvement.\n\n\n *©* Copyright 2024 The MathWorks™, Inc\n\n\r\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathworks-teaching-resources%2Fprogramming-a-starter-project-using-matlab-and-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmathworks-teaching-resources%2Fprogramming-a-starter-project-using-matlab-and-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathworks-teaching-resources%2Fprogramming-a-starter-project-using-matlab-and-python/lists"}