I need to create letter K with 20 pixel by 20 pixel by plotting

조회 수: 2 (최근 30일)
John Doe
John Doe 2019년 11월 13일
댓글: KALYAN ACHARJYA 2019년 11월 13일
Just start MatLab, I can plot the letter on 5x5 matrix but a 20x20 is to much
  댓글 수: 2
KALYAN ACHARJYA
KALYAN ACHARJYA 2019년 11월 13일
Can you share more details?
John Doe
John Doe 2019년 11월 13일
편집: John Doe 2019년 11월 13일
Hello, I figured out how to plot a letter using these scripts
n = 5; % size of matrix
x = [2 2 2 3 4 4 4 ]; % x-coordinate
y = [1 2 3 2 2 3 1 ] ; % y-coordinate
y_new = n - y; % upside down for y-coordinate
plot(x,y_new,'o','MarkerEdgeColor','b','MarkerFaceColor','b','MarkerSize',12), axis([0 n 0 n]), axis square, grid on;
Can you help me rotate this letter 90 degrees using transformation matrix.

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

채택된 답변

KALYAN ACHARJYA
KALYAN ACHARJYA 2019년 11월 13일
편집: KALYAN ACHARJYA 2019년 11월 13일
"Now I want to know how to rotate this letter 90 degrees"
n=5; % size of matrix
x=[2 2 2 3 4 4 4 ]; % x-coordinate
y=[1 2 3 2 2 3 1 ] ; % y-coordinate
y_new=n-y; % upside down for y-coordinate
figure,plot(x,y_new,'o','MarkerEdgeColor','b','MarkerFaceColor','b','MarkerSize',12), axis([0 n 0 n]), axis square, grid on;
figure,plot(y_new,x,'o','MarkerEdgeColor','b','MarkerFaceColor','b','MarkerSize',12), axis([0 n 0 n]), axis square, grid on;
  댓글 수: 4
John Doe
John Doe 2019년 11월 13일
I need to use some kind of linear transformation matrix to rotate the image.
KALYAN ACHARJYA
KALYAN ACHARJYA 2019년 11월 13일
linear transformation? Please illustrate with example

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 3-D Scene Control에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by