How can i get optimization or interpolation value for this 3-data?
1 view (last 30 days)
Show older comments
x = [30 34 38 42 46 50 54 58 62 66 70 30 34 38 42 46 54 58 62 66 70];
y = [70 66 62 58 54 50 46 42 38 34 30 30 34 38 42 46 54 58 62 66 70];
z = [306.2802 305.4982 305.6566 305.3331 305.4320 305.2000 305.7223 305.4895 305.6325...
305.8428 305.7818 306.7651 307.3100 307.2416 307.0577 307.2612 305.5037 305.1273 304.9247 305.3628 305.6063]
i want to get minumum z value .. help me
0 Comments
Answers (2)
Star Strider
on 31 Oct 2021
I doubt that any interpolation is necessary.
Juyst find (and if desired, plot) the minimum and associated values —
x = [30 34 38 42 46 50 54 58 62 66 70 30 34 38 42 46 54 58 62 66 70];
y = [70 66 62 58 54 50 46 42 38 34 30 30 34 38 42 46 54 58 62 66 70];
z = [306.2802 305.4982 305.6566 305.3331 305.4320 305.2000 305.7223 305.4895 305.6325...
305.8428 305.7818 306.7651 307.3100 307.2416 307.0577 307.2612 305.5037 305.1273 304.9247 305.3628 305.6063];
[zmin, idx] = min(z)
figure
stem3(x, y, z)
hold on
plot3(x, y, z)
scatter3(x(idx), y(idx), z(idx), 75, 'r', 'v', 'filled')
hold off
grid on
text(x(idx), y(idx), z(idx), sprintf(' \\leftarrow z_{min} = %.4f',z(idx)), 'Horiz','left', 'Vert','middle', 'Rotation',15)
.
3 Comments
Star Strider
on 1 Nov 2021
My code plots the corresponding values of all three variables.
Note that ‘x’ and ‘y’ do not have unique values (‘x’ repeats and ‘y’is symmetric), so it is difficult to determine the relationshiup between the three variables. I doubt that it is possible to develop any sort of analytic relationship between them.
What experiment created the data? A nonlinear relationship modellling the process that created the data could be possible, however it would be necessary to have a mathematical expression of that process to model it and extimate parameters that could then be used to calculate whatever the ‘true’ minimum is.
.
Matt J
on 31 Oct 2021
i want to get minumum z value
That would simply be
[zmin,loc]=min(z)
Did you mean you also want the corresponding values of x and y? If so,
xmin=x(loc);
ymin=y(loc);
See Also
Categories
Find more on Interpolation in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!