1.85 exponential axis plot - possible?

I m new to Matlab, I just wanted to know whether is possible to have the X axis values (ticks) of a plot raised to the power of 1/1.85. Intent is to plot the following equation
P = a * (Q/C)^1.85 * (L/D^4.87)
where a, C, L, D are known constants. The plot needs to be drawn as a line, so basically I need to plot the P(Q^1.85). That's easy enough, however the problem is it seems I cannot have the x axis showing the Q values, not the Q^1.85. That's very similar to a semi-log plot, only that it is not realy a log plot rather a semi-exponential plot of 1.85.
Is it possible? Any suggestions?

 采纳的回答

You can set your tick labels to be whatever your want. The label and value are indpendent properties. One approach would be to determine what Q values you want to have your ticks at, place the ticks using the value Q^1.85, but then set the labels to the Q value.
Q=100:10:1000;
plot(Q.^1.85,P)
tickLoc = linspace(0,ceil(Q(end)),9);
set(gca,'XTick',tickLoc.^1.85,...
'XTickLabel',string(tickLoc))

更多回答(0 个)

类别

在 帮助中心 和 File Exchange 中查找有关 Annotations 的更多信息

产品

版本

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by