Error message “Value must be a 1x2 vector of increasing datetime values.” | MATLAB | Forum

Avatar

Please consider registering
Guest

Search

— Forum Scope —






— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

Register Lost password?
sp_Feed sp_TopicIcon
Error message “Value must be a 1x2 vector of increasing datetime values.”
Avatar
Adarsh_Murthy

Forum Posts: 59
sp_UserOfflineSmall Offline
1
September 16, 2016 - 3:56 pm
sp_Permalink sp_Print

If you are manually setting the axis limits of your plot using the datenum function as below:

 plotHandle.Parent.XLim = [datenum(datetime('8-August-2016')), datenum(datetime('20-August-2016'))]

 

the following error might be generated:

 

Error using matlab.graphics.axis.decorator.DatetimeRuler/validateLimits

Value must be a 1x2 vector of increasing datetime values.

Error in matlab.graphics.axis.decorator.DatetimeRuler/setLimitsDelegate

 

To resolve the error, use the following command instead:

 

plotHandle.Parent.XLim = [(datetime('8-August-2016'), datetime('20-August-2016')]

Forum Timezone: America/New_York

Most Users Ever Online: 114

Currently Online:
21 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

rw950431: 252

Vinod: 164

cstapels: 96

piajola: 75

vespapierre: 63

Adarsh_Murthy: 59

Newest Members:

dannymm1

KamorkasOr

GRV2903

Jusikaclaiz

Raymondpoers

ScottDus

Forum Stats:

Groups: 4

Forums: 17

Topics: 1313

Posts: 4565

 

Member Stats:

Guest Posters: 1

Members: 5703

Moderators: 0

Admins: 2

Administrators: Hans, lee