Got Questions? Get Answers.
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
robustfit slope

Subject: robustfit slope

From: John M

Date: 22 Oct, 2010 08:26:03

Message: 1 of 4

Hello,

I have some experimental data plotted P1 vs strain1 using the robustfit function.

B=robustfit(P1,strain1);
plot(P1,B(1)+B(2)*P1);

where P1 and strain1 are vectors.

Using this function a line is plotted and I'd like to know the slope of this line.
The output B is a vector:

B =
  214.4724
  149.8693

To be honest I don't really understand what the vector values represent and I'm unable to find the slope.

Does anybody know how to find the slope of the line which is produced by the robustfit function?

Subject: robustfit slope

From: John M

Date: 22 Oct, 2010 09:03:04

Message: 2 of 4

ANYBODY??

Subject: robustfit slope

From: Wayne King

Date: 22 Oct, 2010 10:14:04

Message: 3 of 4

"John M" <ioannis.mitsos@gmail.com> wrote in message <i9rhqr$7lt$1@fred.mathworks.com>...
> Hello,
>
> I have some experimental data plotted P1 vs strain1 using the robustfit function.
>
> B=robustfit(P1,strain1);
> plot(P1,B(1)+B(2)*P1);
>
> where P1 and strain1 are vectors.
>
> Using this function a line is plotted and I'd like to know the slope of this line.
> The output B is a vector:
>
> B =
> 214.4724
> 149.8693
>
> To be honest I don't really understand what the vector values represent and I'm unable to find the slope.
>
> Does anybody know how to find the slope of the line which is produced by the robustfit function?

Hi John, B(1) is the intercept term and B(2) is the slope.

Wayne

Subject: robustfit slope

From: Steven_Lord

Date: 22 Oct, 2010 14:08:37

Message: 4 of 4



"John M" <ioannis.mitsos@gmail.com> wrote in message
news:i9rk08$nac$1@fred.mathworks.com...
> ANYBODY??

Be patient! You asked your original question around 8:30 AM UTC (4:30 AM
here on the East coast of the US) and you posted your follow-up just after
9:00 AM UTC (5:00 AM here in Natick.) Our friends in Europe were working on
their first cup of coffee and those of us in the US were asleep when you
posted both your messages.

Anyway, look at the examples on the reference pages:

http://www.mathworks.com/help/toolbox/stats/robustfit.html

The equation of the curve ROBUSTFIT returned is (approximately) y =
9.1063-1.8231*x. Using this example, I think you can determine how to
interpret the result of your call to ROBUSTFIT.

--
Steve Lord
slord@mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us