**Finding the slope and y intercept of lsline**Hi All
I had used lsline function to find the least square line.Can you help
me for finding the slope and y intercept of the least square line.
Thanks in advance
PMN
PMN <praveenmn1@gmail.com> wrote in message <908774cc-7a99-4819-9dae-db0f7d4ee65b@o16g2000prh.googlegroups.com>...
> Hi All
>
> I had used lsline function to find the least square line.Can you help
> me for finding the slope and y intercept of the least square line.
>
> Thanks in advance
> PMN
hi.........no need to use lsline........if u r only want to find out slope and intercept ....o it w...

**Slope and Intercept**Hi,
I have two columns X and Y. Is there a way to find out the slope and
intercept for the columns?
Thanks much for the help
...

**slope and intercept**Dear MATLAB community,
I am trying to determine the slope (a) and intercept (b) for
a linear fit y = ax+b.
I know the function postreg ([slope,intercept,r] =
postreg(x',y']) will do it for me, but I would like to find
a function that calculates these parameters without the plot
postreg creates
Thank you for your inputs,
Benoit
"Benoit " <igneb@iastate.edu> wrote in message
<g36uct$1m6$1@fred.mathworks.com>...
> Dear MATLAB community,
>
> I am trying to determine the slope (a) and intercept (b) for
> a linear fit y = ax+b.
>
> I know the ...

**find.find**import fnmatch, os
def find(pattern, startdir=os.curdir):
matches = []
os.path.walk(startdir, findvisitor, (matches, pattern))
matches.sort()
return matches
def findvisitor((matches, pattern), thisdir, nameshere): #
for name in nameshere:
if fnmatch.fnmatch(name, pattern):
fullpath = os.path.join(thisdir, name)
matches.append(fullpath)
can someone explain why (matches, pattern) is doing in this two funct?
thanks
In <eo15uq$hna$1@ss408.t-com.hr>, Gigs_ wrote:
> import fnmatch, os
>
> def find(pattern, startdir=os...

**Find::Find**I'm writing a script to process a directory tree of images. In each
directory, I need to process each image and generate an HTML file listing
all of the images and links to the subdirectories.
Just about every source I can find on the 'net for processing subdirectories
points you at Find::Find. However, I'm trying to do something like this:
enter directory
open INDEX, ".\index.html"
print INDEX HTMLheader
foreach file{
if(file is an image){
...

**to find slope**hi
how to find slope for logarithmic curves using matlab......
...

**Find.find does not find orphaned links?**Find.find does not seem to find orphaned links:
Downloads>ln -s /nonexistent
Downloads>ls -l
total 0
lrwxrwxrwx 1 wybo users 12 Nov 15 14:15 nonexistent -> /nonexistent
Downloads>irb
irb(main):001:0> require 'find'
=> true
irb(main):002:0> Find.find('.') do |f| puts f end
Hi,
In message "Re: Find.find does not find orphaned links?"
on Tue, 15 Nov 2005 22:19:59 +0900, Wybo Dekker <wybo@servalys.nl> writes:
|Find.find does not seem to find orphaned links:
It's a bug. Thank you.
matz.
...

**How to find a slope of line.**hi
I have a plot with diff values of x and y.
i want to find the plot of that linear function slope.
like y=mx+c
and m= slope.
Hi Maulik,
Polyfit should help you.
Best.
...

**Re: Slope and Intercept**Hi,
Are you trying to do a regression?
If so, proc reg will do.
--
Regards,
Murphy Choy
Certified Advanced Programmer for SAS V9
Certified Basic Programmer for SAS V9
DataShaping Certified SAS Professional
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of sasbegy
Sent: Tuesday, April 28, 2009 11:27 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Slope and Intercept
Hi,
I have two columns X and Y. Is there a way to find out the slope and
intercept for the columns?
Thanks much for the help
I wonder if sasbegy is referring to point slope and intercep...

**extrapolate to find the intercept**hi all,
i'm sure this is a simple one but i'm not sure how to do this the most efficient way in matlab: i have a vector x=[2.5;3.456];. how do i extrapolate this vector so that it hits the intercept? or find the intercept in a different way? is there a simple function for that?
any help is appreciated.
"Linda" wrote in message <l3r34b$7j9$1@newscl01ah.mathworks.com>...
> hi all,
>
> i'm sure this is a simple one but i'm not sure how to do this the most efficient way in matlab: i have a vector x=[2.5;3.456];. how do i extrapolate this vector ...

**Finding the slope/ gradient**Hi all
I m given a point P in 3-D , (x,y,z ) values. And its 8 connecting points ( 3-D points.... (x,y,z) values) i.e. these 9 points can be considered to be placed in the form of a 3x3 matrix. I have to find the gradient of the plane containing this 9 points at the (2,2) pt P (mid point of the 3x3 matrix).
I tried to use the sobel kernal type weighted summation of the difference of the points and then divide it by dx (or dy) but that didnt work out. I am considering that the z value of the (x,y,z) values as the function value.... z=f(x,y).
I am not sure if matlab has an inbuilt func...

**Error in slope and intercept**I was informing myself about linear regression with error in both observables and found this algorithm: (Weighted Orthogonal Regression by Alternating Least Squares)
worals[x_, y_, sx_, sy_] := Block[{a,b,f,z, u = 1/sx, v = 1/sy, w = (sy/sx)^2},
{a,b} = (y*v).PseudoInverse@{v,x*v}; f = #.#&[(a+b*x-y)v];
While[f > (z = (x*w + (y-a)b)/(b^2 + w);
{a,b} = (y*v).PseudoInverse@{v,z*v};
f = #.#&@Join[(z-x)u,(a+b*z-y)v])];
{f,{a,b}}]
which gives me {chisquare, {intercept, slope}} as output.
This works prefectly fine but I'd like to get the error on slo...

**finding slope regions**
This issue seems simple at first, but has proven to be quite an algorithmic challenge. I’d appreciate any insights.
We have data that appears as combinations of straight lines in log-log plots, say a slope of 0.3 followed by a slope of 1.6. We'd like to fit lines to the data and get their parameters.
The data is experimental, so is of course quite noisy, just seems pretty straight in log-slope... In addition, between different slope regions, e.g. slope of 0.3 and 1.6, there are rounded "knees". The knee regions change in curvature and total length from plot to plot, ...

**slope**What is the slope-intercept equation of the line that contain the
point (3,2) and has slope m=4?
What is the slope and y intercept of the line represented by the
equation: 2x + 2y =3?
Thanks,
SH
Sonia Haynes wrote:
>
>
> What is the slope-intercept equation of the line that contain the
> point (3,2) and has slope m=4?
>
> What is the slope and y intercept of the line represented by the
> equation: 2x + 2y =3?
>
> Thanks,
> SH
look in an elementary maths textbook
Sonia Haynes wrote:
> What is the slope-intercept equation of the line that contain the
> po...

**Error on slope and intercept**I was informing myself about linear regression with errors in x and y.
I dont really understand the theory behind the following algorithm but it would be nice if someone could tell me how i get the error of the intercept and slope.
worals[x_, y_, sx_, sy_] :=
Block[{a, b, f, z, u = 1/sx, v = 1/sy, w = (sy/sx)^2},
{a, b} = (y*v).PseudoInverse@{v, x*v}; f = #.# &[(a + b*x - y) v];
While[f > (z = (x*w + (y - a) b)/(b^2 + w);
{a, b} = (y*v).PseudoInverse@{v, z*v};
f = #.# &@Join[(z - x) u, (a + b*z - y) v])];
{f, {a, b}}]
Thanks for any help
...

**extrapolate to find the intercept #2**hi all,
i'm sure this is a simple one but i'm not sure how to do this the most
efficient way in matlab: i have a vector x=[2.5;3.456];. how do i
extrapolate this vector so that it hits the intercept? or find the
intercept in a different way? is there a simple function for that?
a) doc interp1
b) doc polyval % and friends
c) how would you find slope/intercept w/ simple algebra??? Implement
same...
--
...

**FIND finds too much**% The problem, easily seen below, is the unexpected behavoir of FIND.
% DTA is an 1152x17 matrix whose details should not, it seems to me, be important.
A1=find(DTA(:,2)==+1&DTA(:,3)==-1);
DTA(A1(1:2),2:3),DTA(A1(end-1:end),2:3)
ans =
1 -1
1 -1
ans =
1 -1
1 -1
% So far so good, only 1 -1 combinations present (directly verified for ALL entries,
% in DTA(A1,:), not just those shown here). But then
A2=find(DTA(A1,4)==DTA(A1,5));
DTA(A2(1:2),2:3),DTA(A2(end-1:end),2:3);
ans =
1 -1
1 -1
ans =
1 1
1 1
% Why...

**Re: Slope and Intercept #6**I am not familiar with the excel functions that you mention.
If you wish to fit a least squares line to your data, your best solution is
to run either Proc Reg or Proc Glm. While you could calculate the two terms
my doing the calculations found in any elementary stat book, it is not
worth the effort when the procs are there. If you simply want to know the
slope of a line drawn between the two extreme points and they have the
values of x1, y1 and x2, y2, then the formula is
(y2 - y1 )/ ( x2 - x1 )
if I remember my 9th grade geometry class. I don't recall the formula for
the intercept off...

**help on find over find**hi all
I have a problem trying to do the following:
MyModel.find(:all).find(:first)
it can look weird or unnecesary but this is the short explanation,
extended one is:
I have a helper method, this receives a collection an return some html,
this helper works fine if that collection is an association (has_many)
of a model but doesn't work if it is a direct find over a model
the error I receive is "LocalJumpError: no block given"
ultra mega extended explanation is:
a model:
class User < ActiveRecord::Base
has_many :requests
end
other model:
cla...

**Find.find bug?**$ ruby -rfind -e 'Find.find("foo") {|e| p e}'
"foo"
$ ls foo
C:\msys\1.0\local\bin\ls.exe: foo: No such file or directory
It should return nothing if foo doesn't exist.
martin
Hi,
At Wed, 8 Sep 2004 00:45:09 +0900,
Martin DeMello wrote in [ruby-talk:111751]:
>
> $ ruby -rfind -e 'Find.find("foo") {|e| p e}'
> "foo"
>
> $ ls foo
> C:\msys\1.0\local\bin\ls.exe: foo: No such file or directory
>
> It should return nothing if foo doesn't exist.
What version ruby do you run?
$ LANG=C ls foo
ls: foo:...

**Re: Slope and Intercept #2**the SAS equivalent to
slope(y1:y100,x1:x100)
intercept(y1:y100,x1:x100)
is (as already pointed out):
proc reg;
model y = x ;
run; quit;
so yes, you are doing linear regression here.
There are other ways to do the same calculation, though this is the
simplets, if you have SAS/STAT.
Robin High
UNMC
sasbegy <pattukuttani@GMAIL.COM>
Sent by: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
04/28/2009 03:04 PM
Please respond to
sasbegy <pattukuttani@GMAIL.COM>
To
SAS-L@LISTSERV.UGA.EDU
cc
Subject
Re: Slope and Intercept
On Apr 28, 3:41 pm, Shankar <...

**Re: Error in slope and intercept**On Wed, Oct 02, 2013 @ 02:53 AM, Gebbo <nicolasgebbo@googlemail.com> wrote:
> I was informing myself about linear regression with
> error in both observables and found this algorithm:
> (Weighted Orthogonal Regression by Alternating Least Squares)
>
> worals[x_, y_, sx_, sy_] := Block[
> {a,b,f,z, u = 1/sx, v = 1/sy, w = (sy/sx)^2},
> {a,b} = (y*v).PseudoInverse@{v,x*v}; f = #.#&[(a+b*x-y)v];
> While[f > (z = (x*w + (y-a)b)/(b^2 + w);
> {a,b} = (y*v).PseudoInverse@{v,z*v};
> f = #.#&@Join[(z-x)u,(a+b*z-y)v])];
>...

**slope and intercept values on a graph**Hello,
I have [A1], [B1] and [A2] [B2] plotted on a graph using the robust linear regression function.
What I want is to manage to show on the graph a textbox the values of slope and intercept of which are calculated by the robust linear regression.
At the moment I do it through the property editor. However, I'd like this to be done automatically.
Thanks
J.
"John M" <ioannis.mitsos@gmail.com> wrote in message <iape11$lt5$1@fred.mathworks.com>...
> Hello,
>
> I have [A1], [B1] and [A2] [B2] plotted on a graph using the robust linear regression...

**finding find.c**comp.os.minix
finding find.c
Anyone know where the source for find is. I've been looking on 2.0.2 and
haven't been able to find it.
Hul
I found it. Find, for some reason, can't find itself unless its given an
explicit name.
Hul
Hul Tytus <ht@panix.com> wrote:
> comp.os.minix
> finding find.c
> Anyone know where the source for find is. I've been looking on 2.0.2 and
> haven't been able to find it.
> Hul
...