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?

 採用された回答

Cris LaPierre
Cris LaPierre 2020 年 3 月 25 日
編集済み: Cris LaPierre 2020 年 3 月 25 日

1 投票

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 件)

カテゴリ

製品

リリース

R2017b

質問済み:

2020 年 3 月 25 日

編集済み:

2020 年 3 月 25 日

Community Treasure Hunt

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

Start Hunting!

Translated by