Clear Filters
Clear Filters

Making matrix from coordinates

7 views (last 30 days)
Ishani Mukherjee
Ishani Mukherjee on 11 Oct 2020
Commented: Ishani Mukherjee on 11 Oct 2020
I have 460 x and y coordinates. How do I make a matrix ? Thanks in advance.

Answers (1)

Ameer Hamza
Ameer Hamza on 11 Oct 2020
Edited: Ameer Hamza on 11 Oct 2020
See meshgrid()
x; % vector of x-values
y; % vector of y-values
[X, Y] = meshgrid(x, y)
  5 Comments
Ameer Hamza
Ameer Hamza on 11 Oct 2020
Something like this
x = [1,2,3];
y = [2,3,4];
[X, Y] = meshgrid(x, y);
plot(X(:), Y(:), '+')

Sign in to comment.

Categories

Find more on Line Plots in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!