Borrar filtros
Borrar filtros

How to I plot a graph that reflects the percentage of change of an equation when an varable changes

6 visualizaciones (últimos 30 días)
If I had the equation z = x + y^2 is there a way to have a plot were one of the axis is the % change of z and the other axis is the percent change of y. I want to be able to see how much the output is effect by the input. I know that the answer is obvious but I want to I hope to do this sort of thing for other stuff.

Respuestas (1)

John D'Errico
John D'Errico el 13 de Oct. de 2022
Your question is not one with an always easy answer. Effectively, you are asking for a sensitivity analysis. The basic answer would be to use the absolute value of the derivative of your function to measure the sensitivity. But in your case, you want to use an axis to represent the sensitivity of that function. You have TWO variables, x, and y. But you have only 3 dimensions you can plot in, and that function has a different sensitivity for each of x and y.
For example, we might consider the single variable problem...
syms x
y = sin(x);
dy = abs(diff(y));
fplot(dy,[0,2*pi])
xlabel x
ylabel 'sensitivty of y, wrt a small change in x'
But as I said, what you are looking to visualize is actually a 4-dimensional thing.

Categorías

Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by