Borrar filtros
Borrar filtros

Draw a graph by selecting relevant information

3 visualizaciones (últimos 30 días)
Chathu
Chathu el 23 de En. de 2015
Comentada: Chathu el 26 de En. de 2015
I want to draw a distribution graph.
The issue is i need to select the values from a huge set of data.
eg; x= time Difference(1s,2s), y=frequency(1s-->No's , 2s --> No's)
Portion of the values which i need to get extracted:
time Difference =
0.1002
0.0992
0.1001
0.1003
0.0992
0.1002
0.0992
0.1002
0.1002
0.0992
0.1003
0.1002
0.0992
0.1002
.
.
.
How to select the relevant data and plot the graph?

Respuesta aceptada

Stephen23
Stephen23 el 23 de En. de 2015
Maybe histogram (or hist for older versions) does what you want.
But actually your description is not clear: please explain what you mean by "time Difference(1s,2s)". You have not really told us the conditions by which you need to select the data.
  4 comentarios
Stephen23
Stephen23 el 25 de En. de 2015
Editada: Stephen23 el 25 de En. de 2015
MATLAB is great for this kind of problem, because what you wrote in your explanation is almost the right syntax for the MATLAB code. The only thing to keep in mind is that you cannot perform two logical comparisons simultaneously: A<X<B has to performed as two operations A<X & X<B. So to get your desired output try something like this:
chkA = 0.1001<=timeD & timeD<=0.1002;
I also seriously recoomand that you look at using histc ( or histcounts for newer versions), which given a vector of bin edges counts all of the values in each bin for you!
Chathu
Chathu el 26 de En. de 2015
Stephen- thank you so much for your response.

Iniciar sesión para comentar.

Más respuestas (0)

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