![]() When the live script is complete, share it with others. To view and interact with the controls, open this example in your browser or in MATLAB. To filter the data only when the Filter Data button is pressed, set the Run execution option for the drop-down list, checkbox, numeric slider, and edit field to Nothing. To specify a threshold systolic blood pressure, insert a numeric spinner and select the minPressure and maxPressure variables as the Min and Max values. To filter the patient list by age, insert a numeric slider and select the minAge and maxAge variables as the Min and Max values. For instance, to filter the patient list by location, insert a drop-down list and select the locationStrings variable to populate the items in the list. The example uses variables to control the slider and spinner values, as well as the drop-down list items. Using a variety of interactive controls, you can filter a list of patients and then plot the age and systolic blood pressure of the filtered list, highlighting the patients over a specified blood pressure. ![]() This example shows how you can use interactive controls to visualize and investigate patient data in MATLAB. Listed, try running the live script first to create the variable in the workspace.Ĭhanges to the variable are automatically reflected in the drop-down list.įor example, create a live script and define the variable If the variable that you want to select is not Then, in the Items section, select a workspace variable from ![]() Right-click the control and select Configure Control. To populate the items in a drop-down list using the values stored in a variable, Listed, try running the live script first to create the variables in the workspace.Ĭhanges to the variables are automatically reflected in the numeric slider or If the variables that you want to select are not Only variables with numeric values of type doubleĪppear in the drop-down list. Variables, right-click the control and select ConfigureĬontrol. To specify the minimum, maximum, and step values for a slider or spinner using You can link variables to slider values, spinner values, and drop-down items to The control configuration menu to return to the live script. The label text is also the text that displays on button controls inĪll views. To modify the labelįor a control, right-click the control and select ConfigureĬontrol. When the code is hidden, labels display next to the control. Inline button or the Output on right button To the View tab, and in the View section,Ĭlick Hide Code. To hide the code, click the Hide code button Hiding the code is useful when sharing and exporting You can hide the code in a live script and display only formatted text, labeledĬontrols, tasks, and output. To change the text displayed on the state button, in the (pressed or not pressed) determines its current Logical variable by clicking the button on or Use a state button to interactively set the value of a
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |