RECTANGLE using MESHGRID in MATLAB
조회 수: 2 (최근 30일)
이전 댓글 표시
I am interested in creating a square/rectangle using meshgrid in MATLAB. Can someone assist me with this?
Thanks in advance
댓글 수: 0
답변 (2개)
Youssef Khmou
2013년 3월 25일
hi, try :
x=0:0.01:1; % 1 meter
y=x; % square then .
[X,Y]=meshgrid(x,y);
Z=X*Y; % square table
figure, surf(Z), shading interp
댓글 수: 0
Image Analyst
2013년 3월 25일
Why using meshgrid, rather than just regular assigning by indexes, which is a heck of a lot easier and simpler to understand?
grayImage = 128*ones(240,320, 'uint8');
grayImage(20:50, 120:150) = uint8(200);
imshow(grayImage);
axis on;
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!