Brush 4colums data

2 次查看(过去 30 天)
Mohamed Madian
Mohamed Madian 2019-9-29
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 ??

回答(1 个)

Pranjal Kaura
Pranjal Kaura 2021-7-28
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

类别

Help CenterFile Exchange 中查找有关 Tables 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by