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:
Matlab(arc interpolation)

Subject: Matlab(arc interpolation)

From: Sam park

Date: 24 Nov, 2010 04:59:05

Message: 1 of 1

this is m-file which based on center point (x1,y1) , another point(x2,y2) ,th

For arc interpolation.

I have to change this m-file to Interpolating Polynomial
=================================
function exam3(x1,y1,x2,y2,th3)

th2=th3*pi/180;
th1=atan((y2-y1)/(x2-x1));
t=0;
r=sqrt((x2-x1)^2+(y2-y1)^2);
for i = 0:th3
    t=th1+i*pi/180;
    x(i+1)=r*cos(t)+x1;
    y(i+1)=r*sin(t)+y1;
end

plot(x1,y1,'o',x2,y2,'o',x,y);
grid on


 

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