Borrar filtros
Borrar filtros

How to plot Large Dataset

3 visualizaciones (últimos 30 días)
vedesh Mohit
vedesh Mohit el 6 de Feb. de 2018
Editada: per isakson el 6 de Feb. de 2018
Hello, I am trying to plot this large dataset in Matlab. I am suppose to plot the all the points for my research project by incoperating 24 hour speeds for each day for a fifteen year period. I am new to Matlab and I'm not quite sure how to go about doing this.
  4 comentarios
Bob Thompson
Bob Thompson el 6 de Feb. de 2018
Editada: Bob Thompson el 6 de Feb. de 2018
You can use commands like textread() or textscan() to read data from a text file. I believe both of those can also read multiple files at once. These will bring the data into an array where you can analyze and organize it as you desire.
per isakson
per isakson el 6 de Feb. de 2018
Editada: per isakson el 6 de Feb. de 2018
Try
str = fileread( 'dataset.txt' );
str = strrep( str, '''', '"' );
fmt = [repmat('%f',1,24),'%q'];
cac = textscan( str, fmt, 'Headerlines',2, 'CollectOutput',true );
%
figure, imagesc( permute( cac{1}, [2,1] ) ) % displays hourly values
ws = cac{1};
dv = mean( ws, 2 );
figure, plot( dv, '.' ) % displays daily values
What type of diagram do you want?

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Live Scripts and Functions en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by