How to plot Large Dataset

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 件のコメント

M
M 2018 年 2 月 6 日
vedesh Mohit
vedesh Mohit 2018 年 2 月 6 日
編集済み: vedesh Mohit 2018 年 2 月 6 日
Basically, it should be a scatter plot (wind speed vs time) for the 24 hrs daily for the fifteen years. The issue really is to plot the time axis, as I have to use the wind speeds for the 24 hours daily and do that for each day for the fifteen year period. Is there code to read the text file to plot the 24 hours for the fifteen years together or even he 24 hours for one year at a time on the x-axis.
Bob Thompson
Bob Thompson 2018 年 2 月 6 日
編集済み: Bob Thompson 2018 年 2 月 6 日
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 2018 年 2 月 6 日
編集済み: per isakson 2018 年 2 月 6 日
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?

サインインしてコメントする。

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeCreating, Deleting, and Querying Graphics Objects についてさらに検索

質問済み:

2018 年 2 月 6 日

編集済み:

2018 年 2 月 6 日

Community Treasure Hunt

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

Start Hunting!

Translated by