...
Tips: cos og sin i Matlab regner med radianer. Bruk derfor cosd
og sind
eller benytt følgende: grader = radianer*(180/pi)
Code Block | ||
---|---|---|
|
...
Code Block | ||
---|---|---|
| ||
>> [vx,vy] = initVelocity(0,100) vx = 100 vy = 0 >> [vx,vy] = initVelocity(90,100) vx = 0 vy = 100 >> [vx,vy] = initVelocity(45,100) vx = 70.7107 vy = 70.7107 |
...