Unable to plot 2 columns of a matrix against each other
1 view (last 30 days)
Show older comments
Pranav Thiagarajan
on 6 Dec 2016
Commented: Pranav Thiagarajan
on 6 Dec 2016
Hello, I have a 466x2 matrix and I am trying to plot column 1 on the x-axis and column 2 on y. For that, I am trying the following:
I have the matrix antenna1 as
Column 1 Column 2
0.047393 2530
0.047393 2529
0.097389 2513
0.097389 2491
0.147392 2462
0.147392 2423
0.19739 2387
0.19739 2353
0.247396 2328
0.247396 2310 .... and so on
I am plotting the graph using:
figure
hold on
plot(antenna1(:,1),antenna1(:,2))
I get the following graph for this:
This graph shows both lines plotted on the y-axis. I want column 1 on x and column 2 on y.
How do I achieve this?
Thanks for any help.
Pranav
0 Comments
Accepted Answer
More Answers (0)
See Also
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!