×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

polyfit command

polyfit command

polyfit command

(OP)
Hi guys, i am currently trying to use matlab to find an equation of a curve.

The curve is speed (x axis) Vs torque (y axis)

The cordinates for the speed are (0, 20, 40, 60, 65, 70, 75, 80, 85, 90, 95, 100)

The coordinates for the torque are (150, 176, 212, 268, 282, 282, 289, 296, 290, 262, 200, 100, 0)

What i want to do is use this information to find out the equation of this curve, preferably in the form of Torque = soem function of speed.

Any help on this would be much appreciated.

Thanks

RE: polyfit command

1. Type "help polyfit"
2. Why not just use the curve fitter in Excel?

M

--
Dr Michael F Platten

RE: polyfit command

also there is a choice fitting or generating a spline.  Spline exactly matches the data, for use when piecewise solution is acceptable and you suspect no error in the data.  Fit works when you have error in the data or want a simpler expression (not a piecewise expression).

=====================================
Eng-tips forums: The best place on the web for engineering discussions.

RE: polyfit command

and in either case, your two vectors need to be the same length (yours aren't)

=====================================
Eng-tips forums: The best place on the web for engineering discussions.

RE: polyfit command

(OP)
Thanks, for that electricpete, the vecotors are meant to eb the same there was justa typo n there is an extra 282 in the torques. So how would i go about typing code into matlab to exactly match the data and get a equation?

Thanks

RE: polyfit command

Well, the way I'd do it is to find someone who had done the turorials or was paying attention in class, and actually knew how to use matlab, and ask them to do it.

Of course I might have to pay them to do my work for me. Such is life.

Cheers

Greg Locock

SIG:Please see FAQ731-376: Eng-Tips.com Forum Policies for tips on how to make the best use of Eng-Tips.

RE: polyfit command

What Greg said.  If you want the spline, look at
help spline
and
help unmkpp

=====================================
Eng-tips forums: The best place on the web for engineering discussions.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login


Resources

Low-Volume Rapid Injection Molding With 3D Printed Molds
Learn methods and guidelines for using stereolithography (SLA) 3D printed molds in the injection molding process to lower costs and lead time. Discover how this hybrid manufacturing process enables on-demand mold fabrication to quickly produce small batches of thermoplastic parts. Download Now
Design for Additive Manufacturing (DfAM)
Examine how the principles of DfAM upend many of the long-standing rules around manufacturability - allowing engineers and designers to place a part’s function at the center of their design considerations. Download Now
Taking Control of Engineering Documents
This ebook covers tips for creating and managing workflows, security best practices and protection of intellectual property, Cloud vs. on-premise software solutions, CAD file management, compliance, and more. Download Now