Borrar filtros
Borrar filtros

plotting 2 data sets of matrix

2 visualizaciones (últimos 30 días)
Shailendra
Shailendra el 17 de Mzo. de 2014
Respondida: dpb el 17 de Mzo. de 2014
i have a matrix, which has 2 columns, 1st column having Voltage values and 2nd column having frequency (vg value at that particular frequency).
Now i need to plot a graph of voltage v/s frequency. can you please let me know, do i do this?
%code
data=0;
for i=1:10
data(i,1) =i*10;
data(i,2)=3000+i;
end
disp(data);
% code

Respuestas (1)

dpb
dpb el 17 de Mzo. de 2014
A) Don't write arrays unnecessarily in Matlab--
data(:,1)=10*[1:10].';
data(:,2)=3000+[1:10].';
B)
plot(data(:,1),data(:,2))
Work thru examples in "Getting Started" section of Matlab to get a feel for the language syntax/usage of Matlab.

Categorías

Más información sobre Line Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by