Using Live Editor Tasks
Live Editor Tasks are apps that can be embedded in a live script that allow you to interactively explore parameters and options, immediately see the results, and automatically generate the corresponding MATLAB® code for the completed task and for the display of results. In this video, learn how Live Editor Tasks allows you to more effectively perform preprocessing steps on your data and easily control what others see and understand when you share your code with them.
Hello and welcome back to another MATLAB video. Today we’re going to be talking about Live Editor Tasks.
Live Editor Tasks are apps that you can embed in a live script to carry out steps in your analysis. You can explore different parameters, see a preview of results, and use the corresponding MATLAB code.
In today's example, we will be smoothing temperature data and finding local maxima and minima. We've started writing our live script with some code that reads in the data and plots it.
We've already used the Smooth Data Task to smooth our temperature data.
The task has generated a preview of the results showing the original temperature data in blue and the smoothed data as a dark blue line. The smoothed values are given as a MATLAB variable which you can use for further analysis.
Live Editor Tasks perform a series of MATLAB commands. When you change parameters, it is reflected in the code that MATLAB runs.
When sharing this script with others, you may want to control how the Live Editor Task is displayed. From the menu, there are several options to show only the controls, the code, or both.
You can replace the task with the generated code.
In our example, we also want to find the min and max values of our temperature data, which we can do with another Live Editor Task.
You can simply select the task from the toolstrip or type the name on the command line.
First, select the data to operate on.
Here, we'll use the smoothed data from the previous step, and determine both the maxima and minima.
Interacting with the Live Tasks runs all code in the section.
There's an autorun button that can be toggled off so you can make selections and run the code when you choose.
When you're satisfied, you can share your script containing the Live Editor Tasks with others. Live Editor Tasks are saved as part of your live script so they can be used later.
Now that we have a deeper understanding of MATLAB’s Live Editor Tasks, you can more effectively perform preprocessing steps on your data, share your code with others, and they can more easily see and understand exactly what you want them to.
For more practice with Live Editor Tasks, you can search the documentation to find examples.
Thanks for watching and I’ll see you in another video.
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します: .
また、以下のリストから Web サイトを選択することもできます。
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の MathWorks のサイトは、お客様の地域からのアクセスが最適化されていません。
- América Latina (Español)
- Canada (English)
- United States (English)
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- United Kingdom (English)
- Australia (English)
- India (English)
- New Zealand (English)
- 日本Japanese (日本語)
- 한국Korean (한국어)