Matlab help User defined function

  • Context: MATLAB 
  • Thread starter Thread starter qiyan31
  • Start date Start date
  • Tags Tags
    Function Matlab
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 reply · 3K views
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!
 
Physics news on Phys.org
Works fine for me. What is the precise command that you're using to test the function?