How would I use a 2D array based on a topographical map to determine the steepest direction at each point?

4 visualizaciones (últimos 30 días)
You see, for a group project at my college we are trying to simulate rainfall on a topographical surface. My job is to take a 2D array based on this surface and use its data to determine the steepest direction at each point. And use that to create a vector field. Unfortunatly I have very little idea of how to go about this.
If anyone has any advice, I'd really appreciate it.

Respuesta aceptada

John D'Errico
John D'Errico el 12 de Abr. de 2025
You should be talking to your teacher, as these are questions they should be answering. But what does the gradient function do? (You might guess from the name.)
Once you can compute the gradient of a surface at any point, what does the gradient vector tell you? (Again, if you have no idea, talk to your teacher. Or maybe read your notes.)
  1 comentario
Maxim
Maxim el 13 de Abr. de 2025
Thank you so much for the response! I actually did not know about the gradient function until reading your answer, so thank you for the help!

Iniciar sesión para comentar.

Más respuestas (1)

Image Analyst
Image Analyst el 12 de Abr. de 2025
Since this is a homework problem, if you have any questions ask your instructor or read the link below to get started:
Obviously, if it is homework, we can't give you the full solution because you're not allowed to turn in our code as your own.
Another resource that MathWorks Central offers is the AI Chat Playground (on the blue banner above). You can paste your problem text into there and get code. However to be ethical you need to make sure that your professor is willing to accept AI generated code as your own. If he/she is against that and wants you to create your own code, and you submit code from AI or other people, you could be running a risk.

Categorías

Más información sobre Shifting and Sorting Matrices en Help Center y File Exchange.

Productos


Versión

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by