How to plot a graph from minutes to seconds and minutes to milliseconds ?????
9 views (last 30 days)
Show older comments
Hello sir, kindly share your suggestions to solve this problem, input is speed = 150 m/s, convert to km/hr =150*3.6 = 540 for minutes =540/60 = 9 range = 60
manually I done It
t0 = sqrt((5*9)*(5*9)+(60.^2)) = 75
t1 = sqrt((4*9)*(4*9)+(60.^2)) =69.9
t2 = sqrt((3*9)*(3*9)+(60.^2)) =65.7
t3 = sqrt((2*9)*(2*9)+(60.^2)) =62.6
t4 = sqrt((1*9)*(1*9)+(60.^2)) =60.6
t5 = sqrt((60.^2)) =60
t6 = sqrt((1*9)*(1*9)+(60.^2)) =60.6
t7 = sqrt((2*9)*(2*9)+(60.^2)) =62.6
t8 = sqrt((3*9)*(3*9)+(60.^2)) =65.7
t9 = sqrt((5*9)*(5*9)+(60.^2)) =69.9
t10 = sqrt((4*9)*(4*9)+(60.^2)) = 75
%%%MY CODE %%%%%%%
aa = input('enter value for speed:');
speed =aa*3.6
speed_1 = speed/60
%%%calculation%%
b =input('enter range:');
for bb = 1:5
t(bb) = sqrt((speed_1*bb).^2+(b.^2));
end
dd = fliplr(t);
dd_1 = b;
dd_2 = t;
ee = [dd,dd_1,dd_2]
time_1 = (0:1:10)
%%plotting%%%
figure;
plot(time_1,ee,'r.-');
with this code I plot a graph for minutes ,thats of t0 to t10 on one minute interval,kindly share how to make a plot
for seconds and milliseconds.
2 Comments
jonas
on 22 Mar 2018
Perhaps because it's difficult to understand your question/code. You want to plot ms instead of s? Multiply by 10^3
Answers (0)
See Also
Categories
Find more on Graphics Performance in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!