I tried to find the slope for the line I got from contour plot for a function(f) in two variables(z,x) using "Get Coordinate" and the slope =12 which is correct, Is there any way to use specific command to get the slope rather than "Get Coordinate"?
the first variable is z and its values are below:
z = {0.025`, 0.025500000000000002`, 0.026000000000000002`,
0.026500000000000003`, 0.027000000000000003`, 0.0275`,
0.028000000000000004`, 0.0285`, 0.028999999999999998`,
0.029500000000000002`, 0.03`, 0.025`, 0.025500000000000002`,
0.026000000000000002`, 0.026500000000000003`,
0.027000000000000003`, 0.0275`, 0.028000000000000004`, 0.0285`,
0.028999999999999998`, 0.029500000000000002`, 0.03`, 0.025`,
0.025500000000000002`, 0.026000000000000002`,
0.026500000000000003`, 0.027000000000000003`, 0.0275`,
0.028000000000000004`, 0.0285`, 0.028999999999999998`,
0.029500000000000002`, 0.03`, 0.025`, 0.025500000000000002`,
0.026000000000000002`, 0.026500000000000003`,
0.027000000000000003`, 0.0275`, 0.028000000000000004`, 0.0285`,
0.028999999999999998`, 0.029500000000000002`, 0.03`, 0.025`,
0.025500000000000002`, 0.026000000000000002`,
0.026500000000000003`, 0.027000000000000003`, 0.0275`,
0.028000000000000004`, 0.0285`, 0.028999999999999998`,
0.029500000000000002`, 0.03`, 0.025`, 0.025500000000000002`,
0.026000000000000002`, 0.026500000000000003`,
0.027000000000000003`, 0.0275`, 0.028000000000000004`, 0.0285`,
0.028999999999999998`, 0.029500000000000002`, 0.03`, 0.025`,
0.025500000000000002`, 0.026000000000000002`,
0.026500000000000003`, 0.027000000000000003`, 0.0275`,
0.028000000000000004`, 0.0285`, 0.028999999999999998`,
0.029500000000000002`, 0.03`, 0.025`, 0.025500000000000002`,
0.026000000000000002`, 0.026500000000000003`,
0.027000000000000003`, 0.0275`, 0.028000000000000004`, 0.0285`,
0.028999999999999998`, 0.029500000000000002`, 0.03`, 0.025`,
0.025500000000000002`, 0.026000000000000002`,
0.026500000000000003`, 0.027000000000000003`, 0.0275`,
0.028000000000000004`, 0.0285`, 0.028999999999999998`,
0.029500000000000002`, 0.03`, 0.025`, 0.025500000000000002`,
0.026000000000000002`, 0.026500000000000003`,
0.027000000000000003`, 0.0275`, 0.028000000000000004`, 0.0285`,
0.028999999999999998`, 0.029500000000000002`, 0.03`, 0.025`,
0.025500000000000002`, 0.026000000000000002`,
0.026500000000000003`, 0.027000000000000003`, 0.0275`,
0.028000000000000004`, 0.0285`, 0.028999999999999998`,
0.029500000000000002`, 0.03`};
the second variable is x and its values are below:
x = {0.075`, 0.075`, 0.075`, 0.075`, 0.075`, 0.075`, 0.075`, 0.075`,
0.075`, 0.075`, 0.075`, 0.0755`, 0.0755`, 0.0755`, 0.0755`,
0.0755`, 0.0755`, 0.0755`, 0.0755`, 0.0755`, 0.0755`, 0.0755`,
0.076`, 0.076`, 0.076`, 0.076`, 0.076`, 0.076`, 0.076`, 0.076`,
0.076`, 0.076`, 0.076`, 0.0765`, 0.0765`, 0.0765`, 0.0765`,
0.0765`, 0.0765`, 0.0765`, 0.0765`, 0.0765`, 0.0765`, 0.0765`,
0.077`, 0.077`, 0.077`, 0.077`, 0.077`, 0.077`, 0.077`, 0.077`,
0.077`, 0.077`, 0.077`, 0.0775`, 0.0775`, 0.0775`, 0.0775`,
0.0775`, 0.0775`, 0.0775`, 0.0775`, 0.0775`, 0.0775`, 0.0775`,
0.078`, 0.078`, 0.078`, 0.078`, 0.078`, 0.078`, 0.078`, 0.078`,
0.078`, 0.078`, 0.078`, 0.0785`, 0.0785`, 0.0785`, 0.0785`,
0.0785`, 0.0785`, 0.0785`, 0.0785`, 0.0785`, 0.0785`, 0.0785`,
0.079`, 0.079`, 0.079`, 0.079`, 0.079`, 0.079`, 0.079`, 0.079`,
0.079`, 0.079`, 0.079`, 0.0795`, 0.0795`, 0.0795`, 0.0795`,
0.0795`, 0.0795`, 0.0795`, 0.0795`, 0.0795`, 0.0795`, 0.0795`,
0.08`, 0.08`, 0.08`, 0.08`, 0.08`, 0.08`, 0.08`, 0.08`, 0.08`,
0.08`, 0.08`};
below is the equation for the function that is in two variables z and x
f[z_, x_] := -0.6377467633028947` (-0.07784` + x) -
27.72993372621121` (-0.07784` + x)^2 -
3064.951953004679` (-0.07784` + x)^3 +
6.833112300306057` (-0.02712` + z) +
2.5082936542029852` (-0.02712` + z)^2 +
3429.913872901706` (-0.02712` + z)^3
r = ContourPlot[f[z, x] == 0, {z, 0.025, 0.03}, {x, 0.075, 0.08}]
y2 = 0.07806; y1 = 0.07734; x2 = 0.02713; x1 = 0.02707;
mm = (y2 - y1)/(x2 - x1)
12.
m[x1_, x2_, y1_, y2_] := (y2 - y1)/(x2 - x1)
m[0.025, 0.03, 0.075`, 0.08`]
1.