Vector functions with using max and min
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Carter Kunert
el 19 de Abr. de 2020
Comentada: Carter Kunert
el 19 de Abr. de 2020
Very lost and confused. Please help
- Create an x vector from -5 to +5 with spacing of 0.2, and a y vector from -4 to +4 with spacing of 0.2.
- Use the meshgrid command to map x and y onto two new two-dimensional matrices called X and Y.
- Use your new matrices to calculate matrix Z, with values given by(For fun, you can include the command "plot(Z)" although plotting isn't part of this problem.)
- Find the minimum and maximum values Z attains on the intervals defined by x and y.
- Include a comment in your script that explains why the result from the previous question makes sense, mathematically speaking.
2 comentarios
David Hill
el 19 de Abr. de 2020
Editada: David Hill
el 19 de Abr. de 2020
What have you tried? What is the equation for Z? Step one is:
x=-5:.2:5;
y=-4:.2:4;
Respuesta aceptada
David Hill
el 19 de Abr. de 2020
min(min(Z));
max(max(Z));
3 comentarios
David Hill
el 19 de Abr. de 2020
You did you show me how you calculated Z, but I assume Z is a matrix that was produced from the meshgrid of x and y and therefore the boundaries are already built into Z.
Más respuestas (0)
Ver también
Categorías
Más información sobre Interpolation en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!