India Slaver
India Slaver

Reputation: 33

Plotting graph from 2 matrices in Matlab and marking the respective points

I have 2 matrices.

A = [1 2 3 4 5];
B = [100 200 300 400 500]

I want to plot these two matrices on a graph. The values from matrix A should be on x-axis and B matrix should be on Y-axis. And with that, I also want to mark the respective points on the graph. If I use plot(A, B), it plots the graph correctly. How can I mark these 5 points on the graph?

Upvotes: 0

Views: 110

Answers (1)

Marcin
Marcin

Reputation: 238209

You mean you want to do something like this:

figure,plot(A, B, '-o');

enter image description here

Upvotes: 1

Related Questions