RECTANGLE using MESHGRID in MATLAB
1 回表示 (過去 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!