HOW TO PLOT (dK/dE,E) from plot of (K,E)

I have a plot of K vs E. Both K and E are matrices of different dimensions. if I want to plot (dk/dE,E) , but all the time it's showing an error. I have tried like this
dK=diff(K)./diff(E);
dE=diff(E);
dK_dE=dK/dE;
plot(dK./dE,E(1:end-1));

1 comentario

Walter Roberson
Walter Roberson el 18 de Mayo de 2016
Please give us an idea of how the sizes correspond. How do you know which entries in K correspond to which entries in E?

Iniciar sesión para comentar.

 Respuesta aceptada

Walter Roberson
Walter Roberson el 18 de Mayo de 2016
dK = gradient(K);
dE = gradient(E);
dK_dE = dk ./ dE;
plot(dK_dE, E)

Más respuestas (0)

Categorías

Más información sobre Images en Centro de ayuda y File Exchange.

Preguntada:

el 17 de Mayo de 2016

Respondida:

el 18 de Mayo de 2016

Community Treasure Hunt

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

Start Hunting!

Translated by