Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Matlab help! User defined function!

  1. Nov 7, 2012 #1
    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 plz!
     
  2. jcsd
  3. Nov 7, 2012 #2
    Works fine for me. What is the precise command that you're using to test the function?
     
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook