How to extract the values of x and y from this matlab regression models?
Show older comments
I have executed the matlab regression modeling (see the attached screenshot) but i want to extract the data of x,y into excel sheet to use it in drawing other plots.
can any one help me?
Regards
Ahmed
4 Comments
dpb
on 29 Aug 2020
Use the "export model" and read about fit postprocessing to use the resulting fit object.
What do you mean by "the data of x,y"? Do you mean you want to access the (x,y) coordinates that are plotted within the Regression Learner App?
There might be a better way to do this but you could extract them directly from the figure.
- Get the handle to the app's axes. Here are two ways to do that.
- Once you have the handle, let's call is RLax, you can get the (x,y) coordinates of each plotted object using two lines below.
X = get(RLax.Children, 'XData');
Y = get(RLax.Children, 'YData');
X and Y will be cell arrays of vectors, one element for each line object.
Ahmed Elbeltagi
on 30 Aug 2020
Accepted Answer
More Answers (0)
Categories
Find more on Simulink Design Optimization in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
