Rectangle formed with lines

조회 수: 7 (최근 30일)
Dark Shadow
Dark Shadow 2020년 4월 7일
댓글: the cyclist 2020년 4월 9일
How can I create a rectangle with lines when I have to insert the rectangels dimensions via input (ex: Width: 5 Length: 10).
The center of the rectangle is at the center of XY axes.
Plot the rectangle.
I have days and I cant find the solution. Please tell me the solution.
Thank you!
  댓글 수: 4
Image Analyst
Image Analyst 2020년 4월 9일
편집: Image Analyst 2020년 4월 9일
As another solution (not necessarily the best one), you could use 4 calls to the line() function. For example
line([-2.5, 2.5], [-5, 5], 'Color', 'r');
etc.
the cyclist
the cyclist 2020년 4월 9일
You've now asked pretty much the same question three different times on this forum. Different people have given you pretty much the same ideas. The main thing you seem to need to do is use the line command to make the rectangle.
But you don't seem to be making progress. You've only posted code that was supplied to you. You haven't posted anything you've tried yourself. (At least I haven't seen it.) You haven't responded in the forum to the people who are trying to help you.
My recommendations:
  1. Stick to one of these questions here, instead of spreading out the same information in three questions.
  2. Respond in that question to the people who are trying to help you.
  3. Post your own attempt to do the task.
  4. Be specific about where you are stuck.
I have to say, you seem pretty lost in this task. I think you might need to seek help from your instructor or a tutor if you can. This forum might not be enough for you.

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Function Creation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by