Borrar filtros
Borrar filtros

set range in plot interactively

14 visualizaciones (últimos 30 días)
Lotte Piek
Lotte Piek el 15 de Feb. de 2023
Respondida: Chris el 15 de Feb. de 2023
Hello,
I am looking into GUI to interactively set a range and return that data. What I have is a wave signal (around 20 seconds) and I would like to set a range to select out that specific data and save this data. Is there anyone who has an example of doing this programmaticly ?

Respuestas (1)

Chris
Chris el 15 de Feb. de 2023
Attached is a basic app made hastily in App Designer.
There are UI elements including a UIAxes for plotting, and callbacks attached to those elements. The startupFcn callback, triggered when the app is opened, plots the data. There are two main views in app designer: Design view, for defining UI elements, and Code view, for...code.
When you run the app, changing a value in one of the text boxes triggers its ValueChangedCallback, which changes the xlims of the plot. You can also change the limits using the interactive zoom control above the axes.
Hitting the save button triggers its ButtonPushedCallback, which saves the data between the axes xlims.
Designing a GUI is a goal with any number of valid solutions. Matlab's documentation is quite good, and you might start by poking around the App Designer Help, if this is what you're looking for.

Categorías

Más información sobre Develop Apps Using App Designer en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by