I have a time vector column (T) and i need to plot delta(T) vs T ?
9 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Sheraz Khan
am 21 Okt. 2018
Beantwortet: Image Analyst
am 22 Okt. 2018
So i am new in matlab and i have this time vector column. I have to plot the Delta T (which is the difference) vs the time vector column. how to find the delta T of all the values of the column in a single variable and plot it vs T
0 Kommentare
Akzeptierte Antwort
Image Analyst
am 22 Okt. 2018
Since you need to plot "plot the Delta T (which is the difference) vs the time vector column" you need to have T be first and DeltaT be second in the plot() function:
% T = sort(rand(1, 100)); % Whatever....
DeltaT = diff(T);
% Plot the function.
plot(T(1:end-1), DeltaT, 'bo-', 'LineWidth', 2, 'MarkerSize', 8);
grid on;
xlabel('T', 'FontSize', 15);
ylabel('Delta T', 'FontSize', 15);
title('Delta T vs. T', 'FontSize', 15);
0 Kommentare
Weitere Antworten (1)
madhan ravi
am 22 Okt. 2018
T
delta_T = diff(T)
plot(delta_T(1:numel(T)),T,'-ob')
This will do the trick
0 Kommentare
Siehe auch
Kategorien
Mehr zu Scatter Plots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!