Thread Subject:
want to make a time column

Subject: want to make a time column

From: Moon Datta

Date: 16 Aug, 2012 10:54:07

Message: 1 of 6

I have a matrix having three columns. first ones contains the hour, second one minute and third one contains second. likely
a= 0 5 6
     0 5 6
    .................
     1 0 0
     1 0 1
    .................
    23 59 59

Now I want to make a nX1 matrix which should look as

a= 00:05:06
      00:05:06
      ............
      23:59:59

Subject: want to make a time column

From: TideMan

Date: 16 Aug, 2012 11:04:21

Message: 2 of 6

On Thursday, August 16, 2012 10:54:07 PM UTC+12, Moon Datta wrote:
> I have a matrix having three columns. first ones contains the hour, second one minute and third one contains second. likely
>
> a= 0 5 6
>
> 0 5 6
>
> .................
>
> 1 0 0
>
> 1 0 1
>
> .................
>
> 23 59 59
>
>
>
> Now I want to make a nX1 matrix which should look as
>
>
>
> a= 00:05:06
>
> 00:05:06
>
> ............
>
> 23:59:59

datestr(datenum([zeros(size(a)) a]),'HH:MM:SS')

Subject: want to make a time column

From: Moon Datta

Date: 16 Aug, 2012 12:26:07

Message: 3 of 6

"Moon Datta" wrote in message <k0ijgf$95h$1@newscl01ah.mathworks.com>...
> I have a matrix having three columns. first ones contains the hour, second one minute and third one contains second. likely
> a= 0 5 6
> 0 5 6
> .................
> 1 0 0
> 1 0 1
> .................
> 23 59 59
>
> Now I want to make a nX1 matrix which should look as
>
> a= 00:05:06
> 00:05:06
> ............
> 23:59:59

Sir,
I have got it. But I cant move 'a' in a column..namely b...Please help me

Subject: want to make a time column

From: Steven_Lord

Date: 16 Aug, 2012 13:34:03

Message: 4 of 6



"Moon Datta" <monti.tata2012@gmail.com> wrote in message
news:k0iosv$4ho$1@newscl01ah.mathworks.com...
> "Moon Datta" wrote in message <k0ijgf$95h$1@newscl01ah.mathworks.com>...
>> I have a matrix having three columns. first ones contains the hour,
>> second one minute and third one contains second. likely
>> a= 0 5 6
>> 0 5 6
>> .................
>> 1 0 0
>> 1 0 1
>> .................
>> 23 59 59
>>
>> Now I want to make a nX1 matrix which should look as
>>
>> a= 00:05:06
>> 00:05:06
>> ............
>> 23:59:59
>
> I have got it. But I cant move 'a' in a column..namely b...Please help me

You cannot create an n-by-1 matrix (a column vector) with those contents.
The values in the new a contain both numbers and non-numeric characters (the
colons) so you have two choices. Either the new a is a char array (n-by-8)
or the new a is an n-by-1 cell array each element of which is a 1-by-8
string.

--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

Subject: want to make a time column

From: Moon Datta

Date: 17 Aug, 2012 06:01:13

Message: 5 of 6

Sir, I want to plot a graph in which the x axis will be this time series. please tell me then how to manage this time series for plotting a graph.

"Steven_Lord" <slord@mathworks.com> wrote in message <k0j157$988$1@newscl01ah.mathworks.com>...
>
>
> "Moon Datta" <monti.tata2012@gmail.com> wrote in message
> news:k0iosv$4ho$1@newscl01ah.mathworks.com...
> > "Moon Datta" wrote in message <k0ijgf$95h$1@newscl01ah.mathworks.com>...
> >> I have a matrix having three columns. first ones contains the hour,
> >> second one minute and third one contains second. likely
> >> a= 0 5 6
> >> 0 5 6
> >> .................
> >> 1 0 0
> >> 1 0 1
> >> .................
> >> 23 59 59
> >>
> >> Now I want to make a nX1 matrix which should look as
> >>
> >> a= 00:05:06
> >> 00:05:06
> >> ............
> >> 23:59:59
> >
> > I have got it. But I cant move 'a' in a column..namely b...Please help me
>
> You cannot create an n-by-1 matrix (a column vector) with those contents.
> The values in the new a contain both numbers and non-numeric characters (the
> colons) so you have two choices. Either the new a is a char array (n-by-8)
> or the new a is an n-by-1 cell array each element of which is a 1-by-8
> string.
>
> --
> Steve Lord
> slord@mathworks.com
> To contact Technical Support use the Contact Us link on
> http://www.mathworks.com

Subject: want to make a time column

From: Bruno Luong

Date: 17 Aug, 2012 07:11:17

Message: 6 of 6

"Moon Datta" wrote in message <k0kmn9$rs6$1@newscl01ah.mathworks.com>...
> Sir, I want to plot a graph in which the x axis will be this time series. please tell me then how to manage this time series for plotting a graph.

help DATETICK

Bruno

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread

Contact us