x=[1:.1:10 1000];
y=[1:.1:10 2000];
After reading following values in Curve Fitting Toolbox,
I've removed (1000,2000) as an outlier.
After removing outlier point from Curve Fitting Toolbox (manually using mouse) in MATLAB I wish to save modified x and y values in command window.
I tried saving to workspace but that saves some structure named 'workspace' and 'goodness' but doesn't remove outliers from variable x and y in command window.
I assume you use the Curve Fitting App , which is part of the Curve Fitting Toolbox.
You can achieve what you want as follows:
File
, then Print to Figure
. That will produce an independent figure with the plot. The set of valid points is now the current object ( gco
). So, in the command window type
x = get(gco, 'XData'); y = get(gco, 'YData');
to get the coordinates of valid points in variables x
and y
.
To read the values of a line in MATLAB (I use 2013b) I often used in code
lin = get(gca, 'Children');
x = get(findall(lin, 'displayName', 'YourName'), 'xData');
y = get(findall(lin, 'displayName', 'YourName'), 'yData');
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.