Collect multiple data cursor mode info as a matrix from a 3d scatter plot (xyz coordiantes).
조회 수: 1 (최근 30일)
이전 댓글 표시
My aim is to collect multiple data cursor mode info as a matrix from a 3d scatter plot (xyz coordiantes). Each row should correspond to a datatip position and give the x,y,z location. I also calculate the normal deviation from centre for these values.
I am using getCursorInfo to collect position data about a 3d scatter plot.
dcm_obj = datacursormode(f2);
set(dcm_obj,'DisplayStyle','datatip',...
'SnapToDataVertex','off','Enable','on');
When ran, the position info is saved as a 3 wide row vector (x,y,z) dcm_obj_info = getCursorInfo(dcm_obj); dcm_obj_pos = dcm_obj_info.Position;
I then calculate the normal deviation from centre of this data and add it as the 4th column to the data.
dcm_obj_normd = sqrt(sum(dcm_obj_pos.^2,2) );
dcm_obj_data = [dcm_obj_pos dcm_obj_normd];
What i need to do now is create a matrix with each row containing the row vector dcm_obj_data, however the values will when a new cursor location is selected and the code ran again. Instead of overwriting the row vector from previous location I want it to be inserted as a new row in the matrix.
I believe I should be using some kind of loop solution.
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Discrete Data Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!