MATLAB Matlab: How to generate the time data

  • Thread starter Thread starter hsydxhza
  • Start date Start date
  • Tags Tags
    Data Matlab Time
AI Thread Summary
A user seeks assistance in generating time data for a dataset representing two days of normalized power load data, consisting of 96 data points (48 per day). The data is normalized by dividing power values by the peak value, resulting in values between 0 and 1. Forum participants inquire about the specifics of the time data required, suggesting that it may refer to elapsed seconds or minutes. They recommend using MATLAB's colon operator to create a vector of evenly spaced time values, with an example provided for generating a vector from 0 to 24. Additionally, they point out the extensive documentation and tutorials available on the Mathworks website for new MATLAB users.
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
12
Views
3K
Replies
8
Views
2K
Replies
2
Views
2K
Replies
3
Views
3K
Replies
10
Views
3K
Replies
2
Views
2K
Back
Top