creating a rectangle plot

4 views (last 30 days)
PA
PA on 25 Jul 2022
Commented: Walter Roberson on 29 Jul 2022
How can i create this rectangle in matlab?

Answers (3)

Chunru
Chunru on 25 Jul 2022
p = [0 2 2 3 3 5 5 0 0;
0 0 1 1 0 0 4 4 0];
plot(p(1,:), p(2,:))
  6 Comments
Chunru
Chunru on 26 Jul 2022
You can work out the coordinates (use nan to break up the line).
p = [0 4 nan 6 7 7 0 0 nan 4 6 6 4 4;
0 0 nan 0 0 5 5 0 nan -1 -1 1 1 -1];
plot(p(1,:), p(2,:)); axis off

Sign in to comment.


PA
PA on 29 Jul 2022
Edited: PA on 29 Jul 2022
I need to find the value of Xa,Ya, Xb ,Yband can anyone help me with the algorithm
  4 Comments
Walter Roberson
Walter Roberson on 29 Jul 2022
please post a sample image that does not have the annotations

Sign in to comment.


PA
PA on 29 Jul 2022
its a fin which have cordintate Xa,Ya and Xb,Yb
i have to find the formula for the Xa and Ya.
the fins with bold is displayed on the case and the dashed lines are the hidden fins inside the case
  1 Comment
Walter Roberson
Walter Roberson on 29 Jul 2022
Please post an actual image, not a diagram

Sign in to comment.

Categories

Find more on Read, Write, and Modify Image in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!