Brush 4colums data

2 visualizaciones (últimos 30 días)
Mohamed Madian
Mohamed Madian el 29 de Sept. de 2019
Respondida: Pranjal Kaura el 28 de Jul. de 2021
Hello everybody:
I have a GUI that draw data using only two colums which are long. and lat..
However the origional data I use are four colums (Lat, Long, Date, and Force).
I Want to brush the data and save all 4 colums after brushing in one matrix. I usually use the righ mouse and save the variable after brushing ??
I apprechiate if somebody can Help with This ??

Respuestas (1)

Pranjal Kaura
Pranjal Kaura el 28 de Jul. de 2021
Hey Mohamed,
It is my understanding that you want to use the brushing tool on the GUI which was plotted using only 2 columns of a matrix(say X). Now you want to save ALL the entries(All columns) in matrix X, corresponding to the exported brushed data.
I.e. you want to select certain entries from column 'Long' and 'Lat' by using the brushing tool on your plot, and further want to extract all the columns from matrix X corresponding to the saved brush entries.
To select data from plots you can use the brush tool. The selected data can then be exported to the workspace. Refer the documentation to know more.
Here's the code snippet to perform further computation
% X is the Inital Matrix || Bdata is the matrix exported through brush selection || C is the Required Matrix
for i = 1:size(X, 1)
if any(X(i, 1:2) == Bdata)
C(end + 1, :) = X(i, :);
end
end

Categorías

Más información sobre Tables en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by