MATLAB: How to substitute an syms variable into known value and evaluate the result of the same equation that contain it

substitute syms variable evaluate the result

i'm tying to generate a general equation for Bezier curve in polynomial form , differentiate it, then substitute the value of u by 0 or 1 in the general equation but i don't know how
% u incremental value
n=input('input the number of control points = ');
k= n-1
m=1;
for i=0:1:k;
w=1;
syms u
r(w,m)=factorial (k)/(factorial(i)*factorial(k-i))*u.^i*(1-u).^(k-i)
w=w+1
m=m+1
end;
syms u
d=diff (r)
syms u
f= diff(r,2)
for u=1
g1=(r)
end

Best Answer

g1 = subs(r, u, 1);
g0 = subs(r, u, 0);
Related Question