Matlab Error Using Set Values Must Be Monotonically Increasing
Contents |
Support Support Newsreader MathWorks Search MathWorks.com MathWorks Newsreader Support MATLAB Newsgroup MATLAB Central Community Home MATLAB Answers File Exchange Cody Blogs Newsreader Link Exchange ThingSpeak Anniversary Home Post A New Message Advanced Search Help MATLAB Central Community Home MATLAB Answers File Exchange Cody Blogs Newsreader Link Exchange time values must be non-decreasing. ThingSpeak Anniversary Home Post A New Message Advanced Search Help Trial software How do I set
Input Range Must Be Monotonically Increasing React Native
XTick as a vector of NOT increasing values? Subject: How do I set XTick as a vector of NOT increasing values? From: Camille Couzi
Xticklabel
Camille Couzi (view profile) 58 posts Date: 28 Nov, 2011 03:20:08 Message: 1 of 2 Reply to this message Add author to My Watch List View original format Flag as spam Hello! I am plotting a matrix of values on
Xticklabel Matlab
a polar plot, as the rows of my matrix A are frequencies and the columns are directions. if my vector of frequencies is [ 0.1 0.2 0.3 0.4] for example, the automatic Xticks and Yticks on the polar plot generated are [-0.4 -0.3 -0.2 -0.1 0 0.1 0.2 0.3 0.4], which is of course wrong, it should be [0.4 0.3 0.2 0.1 0 0.1 0.2 0.3 0.4] (same but without the "-"). I have tried to write: set(myaxes,'YTick',abs(get(myaxes,'YTick'))); but it sends me the following error: ??? Error using ==> set Values must be monotonically increasing Any idea of how to solve this problem? Thanks a lot in advance!! Subject: How do I set XTick as a vector of NOT increasing values? From: Bruno Luong Bruno Luong (view profile) 5232 posts Date: 28 Nov, 2011 07:54:09 Message: 2 of 2 Reply to this message Add author to My Watch List View original format Flag as spam "Camille Couzi"
Support Answers MathWorks Search MathWorks.com MathWorks Answers Support MATLAB Answers™ MATLAB Central Community Home MATLAB Answers File Exchange Cody Blogs Newsreader Link Exchange ThingSpeak Anniversary Home Ask Answer Browse More Contributors Recent Activity Flagged Content Flagged as Spam Help MATLAB Central Community Home MATLAB Answers File Exchange Cody Blogs Newsreader Link Exchange ThingSpeak Anniversary Home Ask Answer Browse More Contributors Recent Activity Flagged Content Flagged as Spam Help Trial software Jim O'Doherty (view profile) 30 questions 3 answers 0 accepted answers Reputation: 4 Vote0 Plotting of dates error Asked by Jim O'Doherty Jim O'Doherty (view profile) 30 questions 3 answers 0 accepted answers Reputation: 4 on http://www.mathworks.com/matlabcentral/newsreader/view_thread/314752 17 Oct 2011 Accepted Answer by Daniel Shub Daniel Shub (view profile) 62 questions 1,272 answers 398 accepted answers Reputation: 2,836 3 views (last 30 days) 3 views (last 30 days) Dear all, Should be an easy question but I'm having much difficuly plotting non-monotically increasing dates with my data. Heres a simplified version of my code: x= ['20 Sep 2011' '21 Sep 2011' '21 Sep 2011' '23 Sep 2011' https://www.mathworks.com/matlabcentral/answers/18510-plotting-of-dates-error '27 Sep 2011' '28 Sep 2011' '29 Sep 2011' '1 Oct 2011'];y = [ 30255600 30248900 30252600 30281600 30223900 30229100 30336700 30270800 ];dates = datenum(x, 'dd mmm yyyy'); plot(dates, y, '.-y')labels = datestr(dates, 20); set(gca, 'XTick', dates); set(gca, 'XTickLabel', labels);I get an error: ??? Error using ==> set Values must be monotonically increasingError in ==> ecf_read at 127 set(gca, 'XTick', dates);Can anyone help?Regards, Jim 0 Comments Show all comments Tags datenumdatestr Products No products are associated with this question. Related Content 1 Answer Daniel Shub (view profile) 62 questions 1,272 answers 398 accepted answers Reputation: 2,836 Vote0 Link Direct link to this answer: https://www.mathworks.com/matlabcentral/answers/18510#answer_24839 Answer by Daniel Shub Daniel Shub (view profile) 62 questions 1,272 answers 398 accepted answers Reputation: 2,836 on 17 Oct 2011 Accepted answer While there seems to be at least two bugs ...The data 21 Sep 2011 is listed twice. The error probably should be "Values must be STRICTLY monotonically increasing." You need to do something to get rid of the identical dates in the XTick call. You could do something like unique.doc unique The second problem is that 1 Oct 2011 has less characters than the other dates. You cannot do concatenation like that. You need a cell array. 2 Comments Show all comment
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta http://stackoverflow.com/questions/15769496/labeling-x-axis-with-cell-array Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like must be you, helping each other. Join them; it only takes a minute: Sign up labeling x-axis with cell array up vote 1 down vote favorite I have been searching various forums for hours but it seems impossible to do a thing in Matlab that's automatic in excel... I used uiimport to import an xls file with into two values must be arrays (? total newbie), one containing dates for my x-axis and the other the values I want to plot. I have 180 values. The dates are three dates per month, more or less ranging from May 2008 until now, end of March. Using plot(mynumbers) set(gca,'XTickLabel',dates) only puts dates for May 2008 on my x-axis! where did all the other dates go? Instead using plot(mynumbers) set(gca,'XTick',mynumbers,'XTickLabel',dates) gives error message "??? Error using ==> set Values must be monotonically increasing." Please help! matlab share|improve this question asked Apr 2 '13 at 16:37 oceanfront 4119 Have you tried sorting mynumbers before setting them as the XTick property? That is, set(gca,'XTick',sort(mynumbers),'XTickLabel',dates). –wakjah Apr 2 '13 at 16:41 Would this be what you're looking for? –Roney Michael Apr 2 '13 at 16:41 I did the sort but it doesn't work, seems like it lables the axis at the very beginning, but it's impossible to read. –oceanfront Apr 2 '13 at 17:03 Michael, I'm such a n