How to draw a line on a logical matrix in a given scale?

조회 수: 1 (최근 30일)
Osama Tabbakh
Osama Tabbakh 2019년 2월 22일
댓글: Osama Tabbakh 2019년 2월 22일
I want to transform two vectors (x, y) that describe a straight line into a logical matrix, but on a certain scale.
For example:
x = linspace (2e-2,6e-2,20);
y = 4e-2 * ones (1,20);
a = [x' y'];
plot (x,y);
axis([1e-2 7e-2 1e-2 7e-2])
I want to get a logical matrix (100*100), that has this scale.
  댓글 수: 2
Adam Danz
Adam Danz 2019년 2월 22일
What does it mean to convert a straight line into a logical matrix?
It sounds like meshgrid() may come in handy but it's unclear to me what your goal is.
Osama Tabbakh
Osama Tabbakh 2019년 2월 22일
I would like to have the plotted geometry in x,y coordinate as an image. In that case I want to have a line in a logical matrix such that this line corresponds to the plotted geometry in x, y coordinate.

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by