Data extraction from stacked plot
9 次查看(过去 30 天)
显示 更早的评论
I want to extract data from the stacked plot generated , by extracting data i mean that whenever the user clicks on the staked plot , a set of values are displayed at the intersection of the plot and vertical line ( please refer to the figure to get more understanding of what i mean) , i want to extract these values and then write them to an excel sheet . Please help me to do that.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/684553/image.png)
( I want the values displayed in the boxes to be written in an excel file )
Thank you.
0 个评论
采纳的回答
ANKUR KUMAR
2021-7-14
编辑:ANKUR KUMAR
2021-7-14
Let us load random data.
tbl = readtable('patients.xls');
stackedplot(tbl,{'Height','Weight','Systolic','Diastolic'})
There must be value of x over which you wish to extarct all the values. Let us take 50 in this case.
values=[tbl.Height tbl.Weight tbl.Systolic tbl.Diastolic];
values_x=1:size(values,1);
extracted_values=values(values_x==50,:)
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!