User-defined function error: V is undefined

1 reply · 3K views · last reply
qiyan31
Messages
3
Reaction score
0
I made a user-defined function for Height.
function Ht=Height(t,V,Theta);
Ht=V*t*sin(Theta)-4.9*t.^2;
end

V is initial velocity, and i kept on getting input "V" is undefined.
Can someone help me please!
 
Works fine for me. What is the precise command that you're using to test the function?