generate grid and coordinates in a rectangle
19 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
i have sides of a rectangle as input and i want to generate a grid that gives as output the coordinates of the internal points.
2 Commenti
Risposta accettata
KSSV
il 25 Giu 2019
Modificato: KSSV
il 25 Giu 2019
Read about meshgrid. Let L and B be the length and breadth of the rectangle.
L = 2. ;
B = 1. ;
m = 100; n = 100 ;
l = linspace(0,L,m) ;
b = linspace(0,B,n) ;
[X,Y] = meshgrid(l,b) ;
mesh(X,Y)
view(2)
If you have the data points for the opposite sides or for the four side, read about transfinite interpolation.
2 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Scatter Plots in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!