From: Dinesh Dileep Gaurav on
Hi all,
I want to plot x-axis data versus y-axis data. The problem is that X-axis data is in 24-hr format. So x-value 1559 corresponds to 15:59. So next point should be 1600 which corresponds to 16:00, but matlab interpolates between 1559 and 1600 through 1560,1561....1599,,,which is not there in my data. Is there any way to get around this. ??
From: Mirek L on
Try this:
x = [1559 1600]

x1 = floor(x./100) + mod(x,60)/60 % new time vector
From: Mirek L on
There is a bug in my previous post:


x = [1559 1600]

x1 = floor(x./100) + mod(x,100)/60
From: Walter Roberson on
Dinesh Dileep Gaurav wrote:

> I want to plot x-axis data versus y-axis data. The problem is
> that X-axis data is in 24-hr format. So x-value 1559 corresponds to
> 15:59. So next point should be 1600 which corresponds to 16:00, but
> matlab interpolates between 1559 and 1600 through
> 1560,1561....1599,,,which is not there in my data. Is there any way to
> get around this. ??

Convert your x data to fractions of a day and use datetick()