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

6 次查看(过去 30 天)
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.

回答(1 个)

John D'Errico
John D'Errico 2022-10-13
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.

类别

Help CenterFile Exchange 中查找有关 2-D and 3-D Plots 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by