How do I write an x with a dot over it on my graph legend?
116 ビュー (過去 30 日間)
古いコメントを表示
I have a simple problem. I want to use dot notation . like v =dx/dt but I use a dot notation so velocity will be an x with a dot over it like a hat. how do I accomplish that? I know there are certain markups I can use in the legend function likelegend('\delta x(t)) = Δx(t).
What code do I use to get this: ẋ ??
Please and thank you.
0 件のコメント
回答 (1 件)
Abhas
2023 年 7 月 5 日
Hi Nasir,
You can set the dot over a variable on your graph as a legend using the following method:-
t = [0, 1, 2, 3, 4]; % Time values
x = [0, 2, 4, 6, 8]; % Position values
% Plot the data
plot(t, x)
% Set the labels
xlabel('Time')
ylabel('Position')
% Set the legend with dot notation
legend('$\dot{x}(t)$ = Velocity', 'Interpreter', 'latex')
Hope this helps!
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!