Filter löschen
Filter löschen

Plotting a graph for time and distance where i have contant velocity

3 Ansichten (letzte 30 Tage)
muhammad ahmad
muhammad ahmad am 18 Feb. 2019
Bearbeitet: jahanzaib ahmad am 18 Feb. 2019
I am trying to plot a graph i have distance between two point that is coverd via two different path due to which i have different time to complete the path i want to show comparision of both with respect of time how shoulsd i write the code?

Antworten (1)

jahanzaib ahmad
jahanzaib ahmad am 18 Feb. 2019
Bearbeitet: jahanzaib ahmad am 18 Feb. 2019
x=rand(3,2); % three points
d = pdist(x,'euclidean'); % distancecbetween those points
v=50; %veloicty
t=d/v; %time
plot(x(:,1),x(:,2),'.')

Kategorien

Mehr zu Graph and Network Algorithms finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by