Plot the trajectory of vectors in MATLAB -


i have created following data in matlab example, using x , y axes:

t = 1:5    % time in seconds  dxx = [10,8,6,5,4] % speed in x direction w = trapz(t,dxx)   % distance object in x direction (numerical integration)  dyy = [9,7,6,5,3]  % speed in y direction c = trapz(t,dyy)   % distance of object in y direction (numerical integration) 

how can plot vectors dxx(t) vs dyy(t) (the net trajectory @ time t), using data?

first assume need cumtrapz instead of trapz. plotting can use quiver

t = 1:5    % time in seconds  dxx = [10,8,6,5,4] % speed in x direction w = cumtrapz(t,dxx)   % distance object in x direction (numerical integration)  dyy = [9,7,6,5,3]  % speed in y direction c = cumtrapz(t,dyy)   % distance of object in y direction (numerical integration)  quiver(w,c,dxx,dyy) 

resulting in:

enter image description here

is looking for?


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -