Clear Filters
Clear Filters

To store plotregression value in a variabe

2 views (last 30 days)
is it possible to store the regression (R) value in a variable
%%plots the linear regression of targets relative to outputs.
plotregression(targets,outputs)

Accepted Answer

Mehmed Saad
Mehmed Saad on 3 Apr 2020
Suppose the example given below
it is matlab example
[x,t] = simplefit_dataset;
net = feedforwardnet(10);
net = train(net,x,t);
y = net(x);
v =figure,
plotregression(t,y,'Regression')
%% To get Data
Data_X = v.Children(3).Children(1).XData;
Data_Y = v.Children(3).Children(1).YData;
%% To get Fit
Fit_X = v.Children(3).Children(2).XData;
Fit_Y = v.Children(3).Children(2).YData;
%% To get YeqT
  7 Comments
Rodolfo
Rodolfo on 26 Sep 2021
Awesome. I was searching for this since July.
Thank you

Sign in to comment.

More Answers (0)

Products

Community Treasure Hunt

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

Start Hunting!