Vector functions with using max and min

조회 수: 12 (최근 30일)
Carter Kunert
Carter Kunert 2020년 4월 19일
댓글: Carter Kunert 2020년 4월 19일
Very lost and confused. Please help
  1. 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.
  2. Use the meshgrid command to map x and y onto two new two-dimensional matrices called X and Y.
  3. 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.)
  4. Find the minimum and maximum values Z attains on the intervals defined by x and y.
  5. Include a comment in your script that explains why the result from the previous question makes sense, mathematically speaking.
  댓글 수: 2
David Hill
David Hill 2020년 4월 19일
편집: David Hill 2020년 4월 19일
What have you tried? What is the equation for Z? Step one is:
x=-5:.2:5;
y=-4:.2:4;
Carter Kunert
Carter Kunert 2020년 4월 19일
I have made it to step 4. That is where I am stuck.

댓글을 달려면 로그인하십시오.

채택된 답변

David Hill
David Hill 2020년 4월 19일
min(min(Z));
max(max(Z));
  댓글 수: 3
David Hill
David Hill 2020년 4월 19일
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.
Carter Kunert
Carter Kunert 2020년 4월 19일
That clears it up. I appreciate the help.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by