Matlab: How to generate the time data

  • Context: MATLAB 
  • Thread starter Thread starter hsydxhza
  • Start date Start date
  • Tags Tags
    Data Matlab Time
Click For Summary
SUMMARY

The discussion focuses on generating time data in MATLAB for a dataset representing two days of normalized load data with 96 data points (48 per day). User Clark seeks assistance in creating a time vector for this dataset. A solution is provided using the colon operator in MATLAB, specifically the code snippet hourVector = 0:1:24;, which generates a vector of hourly values from 0 to 24. Mathworks offers extensive documentation and tutorials for beginners to learn MATLAB effectively.

PREREQUISITES
  • Basic understanding of MATLAB syntax and operations
  • Familiarity with normalized data concepts
  • Knowledge of data visualization in MATLAB
  • Understanding of time series data representation
NEXT STEPS
  • Explore MATLAB's colon operator for generating sequences
  • Learn about MATLAB's data visualization tools for plotting time series
  • Review Mathworks documentation on time series analysis in MATLAB
  • Investigate MATLAB tutorials specifically for beginners
USEFUL FOR

This discussion is beneficial for new MATLAB users, data analysts working with time series data, and anyone interested in normalizing datasets for analysis in MATLAB.

hsydxhza
Messages
1
Reaction score
0
Hey everyone,
I'm a new starter of matlab, and I'm asked to generate the time data , for a data set of 2 days worth of normalised data with 96 data points total (48 per day)
0.605377319
0.592191368
0.583245509
0.575892748
0.576088821
0.57089287
0.556358913
0.560623514
0.579936766
0.650817382
0.723291096
0.818533859
0.881596039
0.925761623
0.933040857
0.958407882
0.967745889
0.975466288
0.978627975
0.976912331
Here are a part of data I got, and they represent a normalised load of the UK, i.e. divided all the power values by the peak value to get a number between 0 and 1.
Can anyone here help me with it?

Cheers
Clark
 
Physics news on Phys.org
Welcome to PhysicsForums!

What do you mean by time data? Just elapsed seconds / minutes?

You'll need to generate a vector of values. If you want equal spacing, MATLAB allows you to conveniently generate these using the colon (:) operator. The following code generates a vector (list) of numbers from 0 to 24 (in increments of 1, the middle number):
>> hourVector = 0:1:24;

Mathworks provides quite extensive documentation on MATLAB at their website (as linked below in my signature). They also provide quite a nice set of tutorials if you're brand new to MATLAB (I don't know how the videos work, but the young ones seem quite fond of them these days, as opposed to the written tutorials which I learned on):
http://www.mathworks.com/help/techdoc/learn_matlab/bqr_2pl.html

Good luck!
 

Similar threads

Replies
2
Views
3K
  • · Replies 12 ·
Replies
12
Views
4K
  • · Replies 4 ·
Replies
4
Views
10K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 5 ·
Replies
5
Views
4K
Replies
1
Views
4K
  • · Replies 2 ·
Replies
2
Views
2K