Brush 4colums data

조회 수: 1 (최근 30일)
Mohamed Madian
Mohamed Madian 2019년 9월 29일
답변: Pranjal Kaura 2021년 7월 28일
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에서 Descriptive Statistics and Visualization에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by