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?

 Respuesta aceptada

Cris LaPierre
Cris LaPierre el 25 de Mzo. de 2020
Editada: Cris LaPierre el 25 de Mzo. de 2020
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))

Más respuestas (0)

Categorías

Productos

Versión

R2017b

Preguntada:

el 25 de Mzo. de 2020

Editada:

el 25 de Mzo. de 2020

Community Treasure Hunt

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

Start Hunting!

Translated by