Need help coding assignment

조회 수: 2 (최근 30일)
Nestor Hernandez
Nestor Hernandez 2020년 5월 1일
답변: KSSV 2020년 5월 1일
I'm sort of new to MATLAB and I got an assignment where I need to write code in order to solve this problem.
"Write and send screenshot of code written in MATLAB used to solve the given problem"
Could anyone help me with this? I'd gladly appreciate it.

답변 (1개)

KSSV
KSSV 2020년 5월 1일
I can draw square using four points. I am drawing a suqare at one point as origin and a side 1 as below.
L = 1 ; % length of the square
% Form vertices of the square
A = [0 0] ;
B = [1 0] ;
C = [1 1] ;
D = [0 1] ;
P = [A ; B; C; D ;A] ;
plot(P(:,1),P(:,2))
You can extend the above example to your case.

카테고리

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