Clear Filters
Clear Filters

how to elongate parabola? I have plot parabola using 3 points and now i want elongation without changing points.

2 views (last 30 days)
x1=[1,50];
x2=[50,5];
x3=[100,50];
Y=[x1(2);x2(2);x3(2)]
A=[x1(1)^2 x1(1) 1;x2(1)^2 x2(1) 1;x3(1)^2 x3(1) 1]
X=(inv(A))*Y;
x=x1(1):1:x3(1);
Y=(X(1)*(x.^2))+(X(2)*x)+X(3);
figure();
plot(Depth1);
hold on
para=plot(x,Y);
grid on
hold on
text(x1(1),x1(2), ' POINT X1')
text(x2(1),x2(2), ' POINT X2')
text(x3(1),x3(2), ' POINT X3')
hold off
  2 Comments
sushant panhale
sushant panhale on 17 Oct 2017
Thanks for your reply. I wanted to stretch it vertically. I have found the way to stretch it vertically but if know how to do it better way please share your logic for other students.

Sign in to comment.

Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!