How to I plot a graph that reflects the percentage of change of an equation when an varable changes
2 views (last 30 days)
Show older comments
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.
0 Comments
Answers (1)
John D'Errico
on 13 Oct 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.
0 Comments
See Also
Categories
Find more on 2-D and 3-D Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!