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

3 ビュー (過去 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 Center および File ExchangeLine Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by