Plot with symbolic value on x axis

6 次查看(过去 30 天)
Cosimo Mercuro
Cosimo Mercuro 2020-2-17
回答: darova 2020-2-17
Hi!
I've created this live script:
I'd like to plot a graph where on the x axis there are the "symbolic" values of t variable noun: 0, T/8, T/4 and so on , until T and on the y-asxis there are 0, rad2/2, and so on.
Is this possible?
Thanks in advance

回答(1 个)

darova
darova 2020-2-17
Use numeric values to plot
Use symbolic values to make labels
h = plot(x,y)
syms T
x1 = x*T;
set(h,'Xticklabel',x1)

类别

Help CenterFile Exchange 中查找有关 2-D and 3-D Plots 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by